Mac MySQL报错 Could not load MySQL preference pane
解决方案:移除掉旧的,重新安装MySQL 使用老版本5.7.21版本
参考链接:https://devmarketer.io/learn/do-not-install-mysql-macos-sierra-how-to-fix/
终端执行以下命令
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
nano /etc/hostconfig
This step will open a text editor inside of your terminal, you want to delete the line that says MYSQLCOM=-YES-
if
you have one. When you are done you can press Ctr+X and then Y to confirm save and then press ENTER to save again.
Yes I recognize someone will want to use vim or emacs and I really don’t give a shit. Go ahead and use them. Please don’t tell me how much better they are then Nano, because I know they are better, Nano is just simpler for those that have never used a terminal editor before.
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /private/var/db/receipts/*mysql*
That is it! You are successfully uninstalled. Those last three statements that use the term “Reciepts” in the command are especially important to do, because they are what tells the next installer we are about to use that there is already a version of MySQL installed. If you don’t delete those (thats what our commands are doing is deleting them) then the next installer won’t let you use it, thinking that MySQL is already installed. This removes it without a trace.