Skip to content

Instantly share code, notes, and snippets.

@PiJoules
Created February 24, 2015 20:41
Show Gist options
  • Save PiJoules/17fef7a4dfd990786b63 to your computer and use it in GitHub Desktop.
Save PiJoules/17fef7a4dfd990786b63 to your computer and use it in GitHub Desktop.
(Uninstalling + ) Installing MySQL for Mac
# Taken from https://coderwall.com/p/os6woq/uninstall-all-those-broken-versions-of-mysql-and-re-install-it-with-brew-on-mac-mavericks
# Remove MySQL
$ ps -ax | grep mysql # stop and kill any MySQL processes
$ brew remove mysql
$ sudo rm /usr/local/mysql
$ sudo rm -rf /usr/local/var/mysql
$ sudo rm -rf /usr/local/mysql*
# Install MySQL
$ brew doctor # fix any errors
$ brew update
$ brew install mysql
$ unset TMPDIR
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
$ mysql.server start # should be able to use mysql normally now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment