Skip to content

Instantly share code, notes, and snippets.

@tomas-stefano
Created August 7, 2012 21:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tomas-stefano/3289448 to your computer and use it in GitHub Desktop.
Save tomas-stefano/3289448 to your computer and use it in GitHub Desktop.
Reinstalling Mysql on Mac via Homebrew
brew remove mysql
brew cleanup
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
rm ~/Library/LaunchAgents/com.mysql.mysqld.plist
sudo rm -rf /usr/local/var/mysql
brew install mysql
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mysql/5.5.25a/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
# Success! :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment