views:

3103

answers:

4

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/My*
vim /etc/hostconfig and removed the line MYSQLCOM=-YES-
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*

And they haven't seemed to help at all. I am still receiving the same message about their being a newer version. I thought, "Well if I can't fix this than I'll just trump the entire process by installing an even newer version, (the current Beta) which could not possibly be installed." And sure enough, I went to install the Beta and it gave me the same message about how a newer version was already installed. I can't uninstall it from the Prefs Pane because I never installed the PrefPane also.enter code here

A: 

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.

./configure --prefix=/usr/local/mysql --with-extra-charsets=complex \
--enable-thread-safe-client --enable-local-infile --enable-shared \
--with-plugins=innobase
BrianLy
I took some efforts to make sure no MySQL dir/file that I could "see" with my limited vision was around. And then followed the HiveLogic guide. At the end of the HiveLogic guide, in which you are to run MySQL as a test. I got an error instead. Researching the error I found it usually is caused by *multiple* MySQL installations. Ahh!! Where is this phantom MySQL on my Mac? It is an illusive ghost.
AnomalousThought
A: 

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

find / -name mysql -print 2> /dev/null

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

mblackwell8
+11  A: 

Try running also

sudo rm -rf /var/db/receipts/com.mysql.*
Ben Alpert
This was the missing command for me...THANK YOU!
Brandon Watson
Hey, no problem. :)
Ben Alpert
A: 

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.

PaulD