1## Open the Terminal
2
3# Use mysqldump to backup your databases
4
5# Check for MySQL processes with:
6ps -ax | grep mysql
7
8# Stop and kill any MySQL processes
9kill -9 [process_id]
10
11# Analyze MySQL on HomeBrew:
12brew remove mysql
13brew cleanup
14
15# Remove files:
16sudo rm /usr/local/mysql
17sudo rm -rf /usr/local/var/mysql
18sudo rm -rf /usr/local/mysql*
19sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
20sudo rm -rf /Library/StartupItems/MySQLCOM
21sudo rm -rf /Library/PreferencePanes/My*
22
23# Unload previous MySQL Auto-Login:
24launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
25
26# Remove previous MySQL Configuration:
27subl /etc/hostconfig
28
29# Remove the line MYSQLCOM=-YES-
30# Remove previous MySQL Preferences:
31
32rm -rf ~/Library/PreferencePanes/My*
33sudo rm -rf /Library/Receipts/mysql*
34sudo rm -rf /Library/Receipts/MySQL*
35sudo rm -rf /private/var/db/receipts/*mysql*
36
37## Restart your computer just to ensure any MySQL processes are killed
38
39Try to run mysql, it shouldn't work