安装后,运行好mysql并重启我的mac,当我调用以下命令行时,我得到了这个错误:
sudo /usr/local/mysql/support-files/mysql.server start错误在这里:
ERROR! The server quit without updating PID file (/usr/local/mysql/data/Mac.local.pid).当我尝试连接到mysql -u root -p时,出现以下错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)我尝试了这个链接MySQL does not start when upgrading OSX to Yosemite or El Capitan中的解决方案,但什么也没有。我还尝试使用以下命令更改mysql文件夹的所有者:
sudo chown -R _mysql:_mysql /usr/local/mysql/但是什么都没有。
有什么想法吗?
谢谢
发布于 2016-01-16 03:20:58
在safe_mode.its中开始你的mysql为我工作。希望它也能为你工作
/usr/local/mysql/bin/mysqld_safe start发布于 2021-06-10 14:25:28
我不得不卸载mysql
brew uninstall mysql@5.7然后重新安装
brew install mysql@5.7当我检查我的终端时,我可以看到这个警告
[ERROR] --initialize specified but the data directory has files in it. Aborting.然后我不得不这么做
rm -rf /usr/local/var/mysql然后像这样打开my.cnf
nano /usr/local/etc/my.cnf并删除此行mysqlx-bind-address = 127.0.0.1
然后像这样做安装后的工作
brew postinstall mysql@5.7 它终于起作用了。我在这上面浪费了一整天。希望有人觉得这很有用。
https://stackoverflow.com/questions/32234142
复制相似问题