Take the 2-minute tour ×

I accidentally installed the PowerPC version of MySQL on my Intel Mac in Snow Leopard, and it installed without a problem but of course doesn't run properly. I just didn't pay enough attention. Now when I try to install the correct x86 version it says that it can't install because a newer version is already installed. A Google query led me to perform these actions/delete these files to uninstall it:

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/MySQL*
vim /etc/hostconfig and removed the line MYSQLCOM=-YES-
rm -rf ~/Library/PreferencePanes/MySQL*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*

They haven't seemed to help at all. I am still receiving the same message about there being a newer version. I tried installing an even newer version (the current Beta) and it also gave me the same message about a newer version already being installed. I can't uninstall it from the Prefs Pane because I never installed the PrefPane also.

share|improve this question
sudo rm -rf lines with wildcards are a little irresponsible. Especially when you cast the net widely enough to delete anything starting with the letters "My" -- MySQL doesn't have exclusive ownership over the word "My" in its title. –  Eric Goldberg Mar 12 '12 at 22:49
add comment

8 Answers

up vote 132 down vote accepted

Try running also

sudo rm -rf /var/db/receipts/com.mysql.*
share|improve this answer
This was the missing command for me...THANK YOU! –  Brandon Watson Oct 1 '09 at 4:56
Hey, no problem. :) –  Ben Alpert Oct 1 '09 at 22:40
add comment

I also had entries in:


that i had to delete.

share|improve this answer
add comment

sudo find / | grep -i mysql

This worked like a charm for me. Just went through the list and ensured that anything MySQL related was deleted.

share|improve this answer
add comment

I also had a config file at /etc/my.cnf that I needed to delete on my Mac OS X Snow Leopard install

share|improve this answer
add comment

It might be overkill but your MySQL command history can also be wiped from:

share|improve this answer
add comment

You need to identify where MySQL was installed to before attempting to delete it.

I always use the Hivelogic guide to installing under Mac OS X which builds MySQL from source. When setting up the build you can specify a directory under which to install MySQL with the --prefix parameter. You should make sure the directory does not exist and attempt to install from source.

share|improve this answer
add comment

Aside from the long list of remove commands in your question, which seems quite comprehensive in my recent experience of exactly this issue, I found mysql.sock running in /private/var and removed that. I used


...to find anything that looked like a mysql directory or file and removed most of what came up (aside from Perl/Python access modules). You may also need to check that the daemon is not still running using Activity Monitor (or at the command line using ps -A). I found that mysqld was still running even after deleting the files.

share|improve this answer
add comment

If you installed mysql through brew then we can use command to uninstall mysql.

$ brew uninstall mysql

Uninstalling /usr/local/Cellar/mysql/5.6.19...

This worked for me.

share|improve this answer
add comment

Your Answer


