Category Image Installing MySQL on OS X 10.3 Panther for WebObjects Development


Here are the instructions on installing MySQL (at time of writing, stable version was 4.0.16) on OS X Panther 10.3 for development with WebObjects 5.2.2 under XCode

Download 4.0.23 dmg from http://www.mysql.com

Shutdown existing MySQL server app if an older version is already running

Install the .pkg from the MySQL downloaded .dmg

Open a terminal window and type in the following commands (without the double quotes):
cd /usr/local/mysql [Comment: This navigates to the mysql folder]

sudo chown -R mysql data [Comment: This ensures the permissions to the data folder, where databases are stored, are correct]

If this is a first time installation, install the MySQL Startup Item from the MySQL disk image.

Restart the Mac ..... this will cause the MySQL Startup Item to automatically start MySQL

Type this in the terminal:
cd /usr/local/mysql/bin

If this is first time install, type
./mysql -u root (Log in as root (initial install has no password) and set a password for root if you wish:)

At the mysql prompt, type the following replacing password with your password:
grant all on *.* to root@localhost identified by 'password' with grant option;

now type:
exit

and test the login again with the password
./mysql -u root -p

enter the password you set for the mysql root user when prompted.


If you do not want to have to type /usr/local/mysql/bin in front of every command, you have to add the /usr/local/mysql/bin directory to your PATH environment variable in your login script.

For the tcsh shell:
you can do this by running this command once:
echo 'setenv PATH /usr/local/mysql/bin:$PATH' >> ~/.tcshrc. Then you have to close and re-open the terminal window.

For the BASH shell:
BASH "profile" global options file at /etc/profile
sudo pico /etc/profile

change PATH string PREPENDING existing path with /usr/local/mysql/bin: (INSERT AT BEGINNING, NOT END OF STRING)

ctrl-O to save, ctrl-X to exit pico

You are done!

Posted: Thursday - January 29, 2004 at 08:56 AM        


Published by