How do you uninstall MySQL on a Mac?
To uninstall MySQL on a Mac, you can follow these steps:
- Stop the MySQL service.
- Open the terminal application.
- Enter the following command and press enter: sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
- Delete MySQL files:
- Continue by entering the following command in the terminal and press enter: sudo rm -rf /usr/local/mysql*
- Type in the following command and press Enter: sudo rm -rf /Library/StartupItems/MySQLCOM
- Enter the following command and press Enter: sudo rm -rf /Library/PreferencePanes/My*
- Type the following command and press Enter: sudo rm -rf /Library/Receipts/mysql*
- Type in the following command and press Enter: sudo rm -rf /var/db/receipts/com.mysql.*
- Delete MySQL users and groups.
- Continue by typing the following command in the terminal and then press Enter: sudo dscl . -delete /Users/mysql.
- 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.