23 March 2012

Uninstall MySQL from Mac Leopard/Lion

I installed MySQL 5.5.21 64 bits on my Mac OS X Lion (10.7.3), and I couldn't get it working with my Ruby 1.9.3, then I decided to uninstall it and install MySQL 32 bits. The following are the steps that I follow to remove it completely (Thanks to Tom Keur):
  1. Open the 'System Preferences' panel.
  2. Click on the 'MySQL' icon at the bottom of the panel in 'Other' section.
  3. On the 'MySQL' panel, click 'Stop MySQL Server', and uncheck the 'Automatically Start MySQL Server on Startup'.
  4. Close the panel, and open a terminal.
  5. In the terminal, run the following commands:
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

Now you done. Feel free to install another version of MySQL. Good luck.

No comments:

Post a Comment