How to remove MySQL completely Mac OS X Leopard

Written on 23-10-2008 – 20:16:25 | by Tom Keur

Hi,

After I’ve been searching alot I finally mananged it to delete MySQL from my Macbook pro.

The steps:

First you need to edit the file in: /etc/hostconfig and remove the line

Since this is a system file I advise you to open it with nano in terminal:

  1. Open Terminal
  2. sudo nano /etc/hostconfig
  3. Enter your password if you’re not authed yet.
  4. Delete the following line: “MYSQLCOM=-YES-”
  5. CTRL+X (This is the command for closing NANO, Enter the “Y” key to save the file and exit nano).

Second step:

Make sure MySQL is not running.

  1. Open Terminal and copy and paste and run the following commands:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm /etc/my.cnf

MySQL is now removed from your MAC.

Edit 26-02-2009:  Maarten van der Pee wrote a comment that it’s allso needed to delete the my.conf, I added it to the list of commands. Thanks Maarten!

Stem of voeg toe aan:Plaatsen/stemmen op NUjij Plaatsen/stemmen op eKudos Plaatsen/stemmen op MSN Reporter Plaatsen/stemmen op Digg Stumble it! Voeg dit artikel toe aan Del.icio.us Voeg toe aan je Google bladwijzers Abonneer je op de RSS-feed van deze site Verstuur deze pagina per e-mail via Feedburner
  1. 26 Responses to “How to remove MySQL completely Mac OS X Leopard”

  2. By Fabian on Feb 8, 2009 | Reply

    I spent hours trying to remove mysql from my MacBook in order to re-install. None of the information that I found online seemed to work until I tried your method. Thank you very much!

  3. By Tubby on Feb 11, 2009 | Reply

    Goodie, need to do try this xD

  4. By Maarten van der Peet on Feb 25, 2009 | Reply

    Don’t forget sudo rm /etc/my.cnf
    If you want to try out MAMP you get mysql socket problems if you don’t delete this file

  5. By Daytona on Feb 26, 2009 | Reply

    Just wanted to say thank. Like Fabian, I spent hours trying to find a way to remove it, all I found was people asking, and everyone else telling them not to. :(

    You were a BIG BIG BIG help.

    Cheers Mate

    Daytona

  6. By Andrew on Apr 23, 2009 | Reply

    In your code sample you have my.cnf. is that supposed to be my.conf?

  7. By Tom Keur on May 1, 2009 | Reply

    Hey,

    Yeah it’s my.conf I changed my post.
    Thanks for the comment (:.

  8. By strangelove on May 14, 2009 | Reply

    thanks mate

  9. By Matthew Brand on Jun 23, 2009 | Reply

    Thanks.

    The writers of mysql should just make it easier to uninstall their product. I have no idea why they have made that so difficult to do.

  10. By anyabelle on Jun 29, 2009 | Reply

    Thanks :)

  11. By Salomon Lee on Jul 8, 2009 | Reply

    Thanks. It was a great help.

  12. By Liz on Jul 16, 2009 | Reply

    Another place I went to before this forum didn’t say to delete the MYSQLCOM=-YES- line beforehand….I went to do this after having already completed all the other steps. Now MYSQLCOM=-YES- can’t be deleted it seems. I think everything else is uninstalled?? I am new to this, so I’m having a hard time trying to figure out what’s wrong. Any help would be appreciated!!

  13. By Pablo on Aug 25, 2009 | Reply

    Thanks! Big help!

  14. By ProjectBuilder on Dec 1, 2009 | Reply

    Thank you for this post, excellent short guide to remove MySQL from Mac!

  15. By Tony on Dec 21, 2009 | Reply

    Thanks for this. I’m not terminal savy and rely on bbedit a lot. Though it can see system files it can’t delete them.
    Thanks again.

  16. By Amir on Dec 30, 2009 | Reply

    Thanks but add this one:
    sudo rm -rf /var/db/receipts/com.mysql.*
    I can’t install another version before doing that.

  17. By Anoop Sharma on Jan 3, 2010 | Reply

    Thank you so much.

    Tried to find the info on the mysql webpage and could not find it on there. You have been a great help. Thanks

  18. By jeet on Jan 5, 2010 | Reply

    Thanks a lot…..i was looking for help on net for removing mysql cluster 7.0.9. :) thanks once again

  19. By Ricardo on Feb 12, 2010 | Reply

    cool one! cheers man!

  20. By Ed on Feb 14, 2010 | Reply

    Thanks I could not figure out the uninstall so that I can start fresh.

  21. By cavin on Feb 25, 2010 | Reply

    thanks.

  22. By Mutia Fijri Taufani on Mar 9, 2010 | Reply

    thanx for your information, i’ve been searching for an hour, and finally got the solution here..thank you!

  23. By Tyson on Mar 21, 2010 | Reply

    You are a scholar and a gentleman. A few other methods I tried didn’t work, but this did. Thanks for posting.

  24. By Matt on Mar 23, 2010 | Reply

    For snow leopard you also need:
    sudo rm -rf /var/db/receipts/com.mysql.mysql*

    Taken from:
    http://egopoly.com/2009/09/01/how-to-uninstall-mysql-5-1-on-snow-leopard/comment-page-1/#comment-21682

  1. 3 Trackback(s)

  2. Sep 29, 2009: Passaggio a Snow Leopard: scordatevi i database - Mac + Web
  3. Sep 29, 2009: La gemma di MySQL non funziona - Mac + Web
  4. May 17, 2010: Mess of Pottage » MySQL reinstallation notes

Post a Comment