To uninstall MySQL and completely remove it (including all databases) from your Mac do the following:
-
Open a terminal window.
-
Stop the database server.
-
Then 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* 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*
Linux Instructions are similar:
To uninstall mysql on linux, open terminal and type these commands:
sudo apt-get remove --purge mysql-server mysql-client mysql-common -y sudo apt-get autoremove -y sudo apt-get autoclean rm -rf /etc/mysql sudo find / -iname 'mysql*' -exec rm -rf {} \;