How to completely uninstall MySQL in macos?


I want to completely uninstall all the instances of MySQL existing on the macos.

asked 2 years ago
Reputation: 1

1 Answer


Follow the steps to completely uninstall MySQL from macos system.

Enter the below commands one by one

ps -ax | grep mysql
stop and kill any MySQL processes
brew remove mysql
brew cleanup
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/var/mysql
sudo rm -rf /usr/local/mysql*
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

and now

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*

restart your computer just to ensure any MySQL processes are killed

try to run mysql, it shouldn’t work

answered 2 years ago
Reputation: 1

Your Answer

Nothing to preview

Post Answer

Asked:  2 years ago
Viewed:  508 times
Active:  2 years ago