If you intend to replace (upgrade) Apple installed MySql, make sure that it's shut down via "MySQL Manager" that is located inside the "Server" folder
(/Applications/Server/MySQL Manager.app).
Download and install MySql 5.0.77 installer package together with the Startup files.
cd /usr/local/mysql cp /usr/local/mysql/support-files/my-small.cnf /private/etc/my.cnf open -e /private/etc/my.cnf
replace "/tmp/mysql.sock" with "/var/mysql/mysql.sock" at two places near the top.
Create a folder called "mysql" (if you don't already have one) in the /var directory with the right permissions:
cd /var mkdir mysql sudo chown -R mysql mysql sudo chmod 775 mysql
Start up MySql via terminal:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Set PATH environment variable on OS X Client installation.
echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.profile
Close and re-open the terminal window to take effect.
For a secure multi-user setup continue with installation of phpMyAdmin.
(If you already have MySql installed in /usr/local directory.)
cd /usr/local/mysql sudo tar -cvf /tmp/mysql-data.tar data
Download and install MySql 5.0.77 installer package.
cd /usr/local/mysql sudo tar -xf /tmp/mysql-data.tar sudo chown -R mysql /usr/local/mysql/*
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
or
REBOOT COMPUTER