Uninstalling MySQL on Mac OS X Leopard
To uninstall MySQL and completely remove it from you Mac do the following:
- sudo rm /usr/local/mysql
- sudo rm -rf /usr/local/mysql*
- sudo rm -rf /Library/StartupItems/MySQLCOM
- sudo rm -rf /Library/PreferencePanes/My*
- edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
- sudo rm -rf /Library/Receipts/mysql*
- sudo rm -rf /Library/Receipts/MySQL*
The last two lines are particularly important as otherwise, you can't install an older version of MySQL even though you think that you've completely deleted the newer version!

October 25th, 2008 at 13:17 #
Extremely helpful. Thank you!
October 26th, 2008 at 08:46 #
Perfect... Thanks
October 26th, 2008 at 09:45 #
thanks a lot it works properly.
October 26th, 2008 at 10:40 #
I'm glad it has helped others too!
Regards,
Rob...
October 29th, 2008 at 00:43 #
I had been struggling over my install for a while, and thanks to this post I was able to start over. Thank you so very much!
October 29th, 2008 at 14:38 #
Thank you! Exactly what I was looking for :)
November 29th, 2008 at 21:59 #
Thank you so much! This has been driving me nuts for the last couple of days.
December 30th, 2008 at 17:58 #
Thank you! It really saved my day!
January 18th, 2009 at 01:33 #
THANK YOU!!! I would kiss you if I could :)
March 7th, 2009 at 23:52 #
Thanks a lot! This is the only source I've found with great instructions on removing MySQL installs.
March 10th, 2009 at 15:36 #
Saved me a ton of time. Thanks a lot!
March 28th, 2009 at 13:28 #
Holy cow, thanks! Somehow the root account got screwed up and had to reinstall, this was perfect.
March 29th, 2009 at 21:22 #
This is excellent ... many thanks!
April 2nd, 2009 at 17:22 #
Awesome! Thank you very much.
April 16th, 2009 at 13:59 #
Thank you very much. It worked properly.
May 14th, 2009 at 17:46 #
Hi Rob,
After hunting high and low on the web, I came across your website. Great to find somebody that can write clearly and plainly about techie issues.
Wonder if you can help me? I'm using Tiger V10.4.11, and after several disastrous attempts to install MySQL on my Mac before discovering MAMP, I followed your steps above. I then installed MAMP and my Apache server works fine but the MySQL server fails to start. Question is - should I move to Leopard (and would this solve my problems) or is there something else peculiar to Tiger that I have to do...
Yours baffled
Jacqui
May 20th, 2009 at 18:39 #
At least I can have another attempt at MySQL on OS X without having to do a complete reinstall.
May 31st, 2009 at 15:14 #
Thank you for posting this; it helped me out. A couple of small things I noticed while running through the steps (OS X 10.5.7 / MySQL 5.1.34 x86_64 Pkg):
1. If you chose to install mySQL for 'this user only' then you'll want to delete the MySQL.prefPane directory from ~/Library/PreferencePanes rather than the system /Library/PreferencePanes.
2. The /usr/local directory doesn't exist with a default OS X installation. Provided that you haven't installed other applications that use it (check this first!), you can remove the entire /usr/local (rm -rf /usr/local).
3. I did notice that mySQL will create /usr/local if it doesn't exist, and /usr/local/include (though it is left empty), and /usr/local/lib with some Pkg directive that can be removed as well.
May 31st, 2009 at 20:45 #
Thanks for the info, Tom!
Regards,
Rob...
June 5th, 2009 at 12:48 #
Thank You for sharing your wisdom
I hope this gets me back up and running so that i can sleep....
Brett
June 12th, 2009 at 16:30 #
Thanks for the tips, Rob - much appreciated.
Just one note, possibly related to my problematic mySQL install (from package), there was nothing related to change in my /etc/hostconfig (10.5.7, mysql-5.1.35-osx10.5-x86_64)