Skip to content

Instantly share code, notes, and snippets.

@bentedder
Last active December 7, 2016 16:43
Show Gist options
  • Save bentedder/c66d9b9707204e3c9730cf5004f8507b to your computer and use it in GitHub Desktop.
Save bentedder/c66d9b9707204e3c9730cf5004f8507b to your computer and use it in GitHub Desktop.
brew mysql
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
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*
try to run mysql, it shouldn't work
brew doctor and fix any errors
brew update
brew install mysql
unset TMPDIR
mysqld -initialize --verbose --user=whoami --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mysql.server start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment