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
cdto
go to your home directory, and
tar -extract --file
/Desktop/mysql-standard-5.0.22-osx10.4-i686.tarto 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.gzOnce 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
/mysqlOnce you
have the extracted directory, you should change to that directory
cd
/mysqland run the
mysql_install_db program from the scripts directory to initialize the MySQL
databases:
$
scripts/mysql_install_dbYou 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_passwordSince 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 shutdownShare with your friends: