How to completely delete MySQL from Mac

If you want to uninstall or reinstall MySQL on your Mac, it’s not enough to trash it. To delete it completely, you need to get rid of all its associated files, such as databases and configurations. Today, we’ll show how to do that and uninstall MySQL from your Mac safely. 

What is MySQL?

MySQL is a relational database management system (RDBMS) based on structured query language (SQL). Backed by Oracle, a multi-model database management system, this open-source software with a client-server module is an integral part of the most popular software stacks.

Giants like Google, Facebook, Twitter, YouTube, Yahoo!, and Adobe rely on MySQL for data storage purposes. Although it was initially created for limited use, now it’s available for macOS, Windows, Linux, and Ubuntu. As MySQL is a database, it can contain a lot of data, therefore being the largest system on your Mac. So, if you want to delete it, we’ll show you how.

How to remove MySQL from your Mac manually

There are several ways to eliminate MySQL from your computer. Let’s see how you can do that manually. First, go to System Preferences and click MySQL. Press Uninstall to delete the service.

How to remove MySQL from your Mac manually

Now that you trashed the app, it’s time to remove all the related files, including databases. To get rid of these files, use Terminal. Follow the steps below:


Deleting MySQL includes removing all its databases. If you have critical data stored in MySQL, make sure to back up your files before you remove the service from your Mac.

  1. Open Terminal from the Application folder.
  2. Enter sudo mysqldump --all-databases command to backup your databases to TXT files.

    Open Terminal from the Application folder
  3. Check for any MySQL processes using this command ps -ax | grep mysql. If any are found, stop and terminate them. 
  4. Type the following command: sudo rm /usr/local/mysql. Enter your password if required.
  5. Execute the following commands consistently:
    sudo rm -rf /usr/local/mysql
    sudo rm -rf /usr/local/var/mysql
    sudo rm -rf /Library/StartupItems/MySQLCOM
    sudo rm -rf /Library/PreferencePanes/My*
    sudo rm -rf /Library/Receipts/mysql*
    sudo rm -rf /private/var/db/receipts/*mysql*
  6. Remove the line MYSQLCOM=-YES- from /etc/hostconfig.

Now, if you check System Preferences, you won’t find MySQL there. Removing MySQL through Terminal may seem like a tiresome task. 

Luckily, there is a much easier way to uninstall MySQL. All you need to do is to use a dedicated tool, which will quickly detect and remove both MySQL and its files.

How to completely uninstall MySQL on Mac with a third-party uninstaller

CleanMyMac X is a professional Mac cleaner that shows exactly what you have on your Mac. It’s notarized by Apple, so you can be sure that it won’t conflict with any system settings.

Well-known as a junk-cleaner, CleanMyMac X also includes the Extensions feature. 

Here is how to uninstall MySQL with CleanMyMac X:

  1. Grab you a copy of CleanMyMac X — free trial version is here.
  2. Launch it and go to the Extensions module in the sidebar.
  3. Select Preference Panes. 
  4. Check the box next to MySQL.
  5. Preference panes tab
  6. Hit the Remove button. 
  7. Once done, go to the Leftovers tab in Uninstaller. Find any related files and get rid of them. 

As simple as that! Now there’s no trace of MySQL left on your computer.

As you can see, removing MySQL with Terminal is a long and tricky process. But there is a more straightforward way by using the Extensions feature of CleanMyMac X. 

Hope that helped!

Laptop with CleanMyMac
CleanMyMac X

Your Mac. As good as new.