Learning Mysql



Download 4.24 Mb.
View original pdf
Page64/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   60   61   62   63   64   65   66   67   ...   366
Learning MySQL
66 | Chapter 2:
Installing MySQL


i686.tar in your download directory. You can unpack this in any location by opening a terminal window, changing to the directory you want to run MySQL from, and calling the tar program from thereto unpack the file. For example, if the file was downloaded to your Desktop directory, but you want to have the MySQL directory under your home directory, you can open a terminal window and type cd
to go to your home directory, and tar -extract --file
/Desktop/mysql-standard-5.0.22-osx10.4-i686.tar

to unpack the file that’s in your Desktop directory. If the browser does not decompress the file at all, you’ll find the downloaded file still has a .gz extension. You can follow the same steps as for the decompressed file, but use the gunzip option to decompress the file before unpacking it tar --gunzip -extract -file \

/Desktop/mysql-standard-5.0.22-osx10.4-i686.tar.gz

Once the package has been decompressed, you can move the resulting directory to the location you want. For example, you can move it to be under your home directory,
either by dragging and dropping with the mouse, or by using the mv command from the shell mv
/Desktop/mysql-standard-5.0.22-osx10.4-i686

You can also create a symbolic link to the MySQL directory so that you can refer to it as simply
/mysql
:
$ ln -s
/Desktop/mysql-standard-5.0.22-osx10.4-i686

/mysql

Once you have the extracted directory, you should change to that directory cd
/mysql

and run the mysql_install_db program from the scripts directory to initialize the MySQL
databases:
$ scripts/mysql_install_db
You can now start the server using the command bin/mysqld_safe &
Set a password for the MySQL server root account immediately bin/mysqladmin --user=root password the_new_mysql_root_password
Since we’ve set a password for the root user, you need to use this password in all further accesses to the server for the root account. You can now stop the server using the command bin/mysqladmin --user=root --password=the_mysql_root_password shutdown

Download 4.24 Mb.

Share with your friends:
1   ...   60   61   62   63   64   65   66   67   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page