How do you uninstall MySQL on a Mac?

To uninstall MySQL on a Mac, you can follow these steps:

  1. Stop the MySQL service.
  2. Open the terminal application.
  3. Enter the following command and press enter: sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
  4. Delete MySQL files:
  5. Continue by entering the following command in the terminal and press enter: sudo rm -rf /usr/local/mysql*
  6. Type in the following command and press Enter: sudo rm -rf /Library/StartupItems/MySQLCOM
  7. Enter the following command and press Enter: sudo rm -rf /Library/PreferencePanes/My*
  8. Type the following command and press Enter: sudo rm -rf /Library/Receipts/mysql*
  9. Type in the following command and press Enter: sudo rm -rf /var/db/receipts/com.mysql.*
  10. Delete MySQL users and groups.
  11. Continue by typing the following command in the terminal and then press Enter: sudo dscl . -delete /Users/mysql.
  12. Type in the following command and press Enter: sudo dscl . -delete /Groups/mysql

MySQL has now been completely uninstalled. Please note that when executing any command, you will need to input the administrator password.

bannerAds