Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had installed MySQL from the command line when I setup a local web server with custom modules on my Snow Leopard box. I recently discovered MAMP and its just easier to work with it than with the personal web server Apple has and via command like utils.

I uninstall ports completely but still see 'mysqld' in my Activity Monitor. I would like to uninstall this cleanly. Any tips?

share|improve this question

3 Answers 3

up vote 18 down vote accepted

If you haven't yet rebooted your computer, the process could still be running. First, reboot.

Then if MySQL is still showing up after a reboot, from the Terminal, issue the following commands one at a time1:

  • 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*

And using your text editor of choice:

  • Edit /etc/hostconfig and remove the line MYSQLCOM=-YES-

If you still cannot install or run a different version of MySQL, you might have to issue one last command in the Terminal2:

  • sudo rm -rf /var/db/receipts/com.mysql.mysql*
share|improve this answer
    
Hey Michael, I did reboot. Running your recommendation now. –  Abhic Apr 9 '10 at 15:17
    
Worked! Thanks! –  Abhic Apr 9 '10 at 15:22
    
Just tried this on Lion, worked fine for me there too. Thanks! –  Jon Quarfoth Oct 4 '11 at 14:49
    
I'm over a year late to the party, but one thing I just found was that I also had to remove /etc/my.conf so it wouldn't conflict with my newly installed one. Thanks for this answer, though; saved me a bunch of time! –  Steve Nov 13 '12 at 16:36

You will need to kill the mysqld proccess in the Activity Monitor.

Then you will need to delete the following:

/usr/local/mysql
/usr/local/mysql-5.1.45-osx10.5-x86_64/
/Library/StartupItems/MySQLCOM/
/Library/PreferencePanes/MySQL.prefPane/
/Library/Receipts/mysql-5.1.45-osx10.5-x86_64.pkg/
/Library/Receipts/MySQLStartupItem.pkg/

Some of the folders with version numbers in them may be names different then what I have listed.

Also this Stackoverflow question may help: How do you uninstall MySQL from Mac OS X?

share|improve this answer
    
I am unable to kill the process in Activity Monitor. Keeps restarting. –  Abhic Apr 9 '10 at 15:18
    
Thank you as well. –  Abhic Apr 9 '10 at 15:23

Another option is to do the following

Run this

launchctl list|grep mysql

Make note of the name of the mysql process name

launchctl unload mysql-process-name-from-other-command.plist

This will stop the process without need to uninstall or restarting.

share|improve this answer
    
Thank you, already killed & uninstalled it. –  Abhic Apr 9 '10 at 16:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.