解决Mac升级到10.12后关机很慢的问题
一、下载最新mac版本的mysql 地址
二、卸载MySQL
代码如下:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo 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.*
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo 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.*
这么多rm -rf 不敢写个脚本直接跑。。。 😂😂😂 虽然机器比我靠谱
三、安装MySQL
直接安装dmg文件就OK了。
会出一个提示,root的密码。这之后需要改一下。
代码如下:
2016-12-03T05:27:15.648601Z 1 [Note] A temporary password is generated for <a href="mailto:root@localhost">root@localhost</a>:
pju%C!a?t4ek
If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.
You must reset your password using ALTER USER statement before executing this statement.
pju%C!a?t4ek
If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.
You must reset your password using ALTER USER statement before executing this statement.
电脑上有 MySQL Workbench 所以就直接改了 没用命令行了。
最后Navicat连上了 就OK了。
注意:记得卸载之前保存一下sql脚本来恢复数据
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流。
赞 (0)