Skip to content

Instantly share code, notes, and snippets.

@moinsam
Created December 7, 2016 00:47
Show Gist options
  • Save moinsam/0949bda993a453d9ea8992d20636a482 to your computer and use it in GitHub Desktop.
Save moinsam/0949bda993a453d9ea8992d20636a482 to your computer and use it in GitHub Desktop.

Uninstall MySql on a Mac OS X—————————————————————————————
Table of Contents [hide]

    Summary
    Symptom
    Resolution

Summary

To completely uninstall MySql OS X it is neccessary to remove numerous files. Symptom

You unable to install an older version of MySql even though you thought you have removed everything. Resolution

To uninstall MySQL and completely remove it (including all databases) from your Mac do the following:

Open a terminal window
Use mysqldump to backup your databases to text files!

Stop the database server
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /private/var/db/receipts/*mysql*

The last three lines are particularly important as otherwise, you can't install an older version of MySQL even though you think that you've completely deleted the newer version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment