Uninstalling MySQL from OS X 10.6 (Snow Leopard)

After doing an OS X reinstall, I went to reinstall MySQL (version, 5.5.11). After a successful install, I couldn’t get mysql to start. The service was failing to start with the error

mysqld unknown option '--skip-locking'

I went back to install MySQL 5.1, but it wouldn’t install, complaining that a newer version was already installed. To completely uninstall MySQL and all of its pieces do this

First, back up your databases with mysqldump!!!!

Second, stop the database server (if it’s running)

Then open your terminal and run the following commands (hit enter/return after each command):

sudo rm /usr/local/mysql

sudo rm -rf /usr/local/mysql*

sudo rm -rf /Library/StartupItems/MySQLCOM

sudo rm -rf /Library/PreferencePanes/My*

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.mysql*

Finally, edit /etc/hostconfig and remove the line MYSQLCOM=-YES-

This info was already figured out here and here. I just wanted to pull it together in one spot.

comments powered by Disqus