如果你brew install mysql 之后出现问题要卸载:
brew remove mysqlbrew cleanuplaunchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plistrm ~/Library/LaunchAgents/com.mysql.mysqld.plistsudo rm -rf /usr/local/var/mysql
然后重新开始
- installed mysql with
brew install mysql
-
ran the commands brew suggested:
unset TMPDIR mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
-
Start mysql with
mysql.server
command, to be able to log on it -
Used the alternate security script:
/usr/local/Cellar/mysql/5.5.10/bin/mysql_secure_installation
-
Followed the
launchctl
section from the brew package script output - Boom.