How to uninstall MySQL on a Mac.

To uninstall MySQL, you can follow these steps:

  1. Open the “Terminal” application.
  2. Type in the following command and press enter to stop the MySQL server:
sudo /usr/local/mysql/support-files/mysql.server stop
  1. Type in the following command and press enter to uninstall MySQL:
sudo rm -rf /usr/local/mysql
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
  1. Enter the following command and press Enter to delete a MySQL user group and user:
sudo dscl . -delete /Groups/mysql
sudo dscl . -delete /Users/mysql
  1. Enter the following command and press Enter to delete MySQL related files:
sudo rm -rf /var/db/receipts/com.mysql.*
sudo rm -rf /var/mysql
sudo rm -rf /var/log/mysql*
  1. Finally, restart your computer.

After completing the above steps, MySQL on your Mac will be completely uninstalled.

bannerAds