-
Open the Terminal
-
Use
mysqldumpto backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql -
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql brew cleanup -
Remove files:
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* -
Unload previous MySQL Auto-Login:
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist -
Remove previous MySQL Configuration:
# Edit this file: /etc/hostconfig # Remove the line MYSQLCOM=-YES- -
Remove previous MySQL Preferences:
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
-
Star
(957)
You must be signed in to star a gist -
Fork
(220)
You must be signed in to fork a gist
-
-
Save vitorbritto/0555879fe4414d18569d to your computer and use it in GitHub Desktop.
@seemly god bless you! I spend about 8 hours to look for an answer that could help me
brew remove mysql rm -rf /opt/homebrew/var/mysql brew install mysql mysql.server start mysql -urootthis would work , but I noticed that there is another version of mysql on my mac:> mysql -V mysql Ver 14.14 Distrib 5.7.24, for osx11.1 (x86_64) using EditLine wrapperLater use this command :type -a mysqlIt shows that anaconda3 installed a old version automatically.Ops....mysql is /opt/anaconda3/bin/mysqlRemove it , then reinstall.
@martris Thank you
Before uninstalling MySQL, it is important to back up any databases delta android or project files that may be needed in the future. Users can begin by stopping the MySQL server through System Settings, the MySQL preference pane, or Terminal, depending on how it was installed.
brew remove mysql rm -rf /opt/homebrew/var/mysql brew install mysql mysql.server start mysql -urootthis would work , but I noticed that there is another version of mysql on my mac:
> mysql -V mysql Ver 14.14 Distrib 5.7.24, for osx11.1 (x86_64) using EditLine wrapperLater use this command :
type -a mysqlIt shows that anaconda3 installed a old version automatically.Ops....
mysql is /opt/anaconda3/bin/mysqlRemove it , then reinstall.