If you look through the MySQL support docs, there is no clear description for uninstalling MySQL in OS X. Here’s how:
Make sure MySQL isn’t running. If you have the preference pane installed, stop the server. Otherwise you can stop it from the terminal:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
Edit /etc/hostconfig
sudo nano /etc/hostconfig Password: AFPSERVER=-NO- AUTHSERVER=-NO- TIMESYNC=-NO- QTSSERVER=-NO- MYSQLCOM=-YES-
Remove or comment out (# marks the line as a comment) the line that says “MYSQLCOM=-YES-”.
Remove MySQL
Still 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 -rf /var/db/receipts/com.mysql.* sudo rm /etc/my.cnf
That’s it. MySQL is gone.
Hey man,
looks like you have a lot of experience with MySQL. By any chance can share how to properly install it on Mac OS X 10.6.8.
For some reason no matter what have I do, I can not open terminal. And it does not look like it is running at all. I try to connect to it from web page hosted in Apache (same computer) – no go.
Any idea what could be wrong?
Thanks
Make sure it’s installed correctly, first:
MySQL OS X Install Guide
At the bottom of the guide is a link to the MySQL Preference Pane which you can use to start/sop the service without using the Terminal.