Installing MySQL on a MAC
From Documentation
Install MySQL
See http://dev.mysql.com/doc/refman/5.0/en/macosx-installation.html for a detailed description on how to install MySQL on Mac OS X.
Download the DMG Archive of the communitiy server from http://dev.mysql.com/downloads/mysql/ (mysql-5.5.9-osx10.6-x86.dmg). Open this file and double click on the mysql-...pkg file to run the installation:
It is also recommended to install the preference pane (MySQL.prefPane in the package) in this way. After this you can find the preference pane under System Preferences > Other > MySQL. There you can start and stop the MySQL server:
To test if MySQL is running you can open the terminal, switch into the terminal, and execute
./mysql -u root.
The root-user has no password initially. You can change this via the following commands in the MySQL console:
update mysql.user set Password=PASSWORD where User='root';
flush privileges;
To exit the console execute
quit;
Remove MySQL
A good tutorial how to remove MySQL completey from a MAC can be found here: http://tomkeur.net/39/how-to-remove-mysql-completely-mac-os-x-leopard.html:
Open the file /etc/hostconfig with nano from the terminal:
sudo nano /etc/hostconfig
Delete the line MYSQLCOM=-YES-, press CTR-X (exit), and press Y (yes) when you are asked if you want to save the file.
Make sure MySQL is not running and execute the following commands in the terminal:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm /etc/my.cnf
That's it.

