I recently tried installing MySQL with homebrew (brew install mysql) and when I try to run it I get the following error:
brew install mysql
ERROR 2002 (HY00
You'll need to run mysql_install_db - easiest way is if you're in the install directory:
mysql_install_db
$ cd /usr/local/Cellar/mysql// $ mysql_install_db
Alternatively, you can feed mysql_install_db a basedir parameter like the following:
basedir
$ mysql_install_db --basedir="$(brew --prefix mysql)"