Removing MySQL from Mac OSX

Oracle provides a nice guide for installing MySQL on Mac, but no guide for removing it.

nn

Rob Allen provides a nice guide on his website. The steps are below:

nn

Use mysqldump to backup your databases to text files!

nn

Stop the database server

nn

 

nn

[bash]sudo rm /usr/local/mysql

nn

sudo rm -rf /usr/local/mysql*

nn

sudo rm -rf /Library/StartupItems/MySQLCOM

nn

sudo rm -rf /Library/PreferencePanes/My*

nn

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

nn

rm -rf ~/Library/PreferencePanes/My*

nn

sudo rm -rf /Library/Receipts/mysql*

nn

sudo rm -rf /Library/Receipts/MySQL*

nn

sudo rm -rf /private/var/db/receipts/mysql[/bash]

nn

I would further advise running a find command in terminal to see if any MySQL files remain. When I performed the steps above, I missed a few files, probably because I typed in a directory incorrectly.

nn

n

n

n

n

n

n

n

[bash]sudo find / grep -i mysql[/bash]

nn

Remove any straggling files by hand, or repeat the appropriate step from above.

Leave a Reply

Your email address will not be published. Required fields are marked *