1.卸载老版本mysql
进入mac 终端,输入一下命令卸载
cd ~/
sudo rm /usr/local/mysqlsudo rm -rf /usr/local/var/mysqlsudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOMsudo rm -rf /Library/PreferencePanes/My*vim/etc/hostconfig and removed the line MYSQLCOM=-YES-rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*
2.卸载完后,下载mysql版本5.7,安装完后有个默认密码提示框,需要记住此密码
A temporary password is generated for root@localhost: UpauVqBjb7%0
If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.
安装的默认路径在: /usr/local/mysql-5.7.16-osx10.11-x86_64
3.登录 :
3.1先在系统偏好设置开启mysql