Completely uninstall MySQL in Mac OSX

After installing MySQL on a Mac OSX with a simple Install application, uninstalling it is not as simple as it should be. There are left-overs spread in a couple of folders that may prevent you from even installing the same version again.

A simple solution may prevent you from losing a lot of time dealing with the Installation Failed error codes.

Let’s start to uninstall MySQL. It’s not that hard.

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:


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 Terminal:

All this is rather unpleasing thinking that Oracle is not prioritising a proper uninstall since there are so many issues found with the current one. Also, these problems are usually blocking the user from installing any other versions, so is the OSX market so insignificant to let it just pass by? Probably yes, but I just had higher expectancies.

What do you usually do in order to completely uninstall MySQL? Have you encountered other issues or your uninstall usually works smoothly?

  • nadine

    Hi. Thanks for the explanation. Although i have a problem with removing it completely it still says its installed. And when you ask us to delete ‘MYSQLCOM=-YES- ‘ from this file: /etc/hostconfig — that file for me is empty
    and when trying to do the last three on the command line it says not found.

    Would you know what I would need to do?