Mac Brew Uninstall MySql

如果你brew install mysql 之后出现问题要卸载:

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

然后重新开始

  1. installed mysql with brew install mysql
  2. ran the commands brew suggested:

    unset TMPDIR

    mysql_install_db
    --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
  3. Start mysql with mysql.server command, to be able to log on it

  4. Used the alternate security script:

    /usr/local/Cellar/mysql/5.5.10/bin/mysql_secure_installation
  5. Followed the launchctl section from the brew package script output

  6. Boom.
原文地址:https://www.cnblogs.com/iosdev/p/2681917.html