可以连接到Mac Monterey上的Homebrew安装的MySQL
我使用M1 MacBook Air,并用自制的工具管理工具。 我已经安装了MySQL,并且工作正常,但是当我重新启动设备时,它就停止工作了。
运行brew Services启动mysql
时,我不会遇到任何错误,但是当我尝试brew Services list
mySQL时,mySQL被标记为spot> stoped
。
当我尝试使用mySQL -U用户-P密码
输入MySQL时,我会得到以下错误: 错误2002(HY000):无法通过socket'/tmp/mysql.sock'(2)
连接到本地mysql Server'(2)
一些答案暗示)我有以下错误: 。错误!服务器退出而无需更新PID文件(/opt/homebrew/var/mysql/macbook-air.local.pid)。
我已经尝试了许多解决方案,但是其中的非解决方案也有效。
I ma using M1 MacBook Air, and managing my tools with Homebrew.
I've installed Mysql, and it was working fine for a while, but when I've rebooted my device it just stopped working.
I don't get any errors when running brew services start mysql
, but when I try brew services list
MySQL is marked as stopped
.
When I try to enter mysql with mysql -u user -p password
I get following error:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
When I run mysql.server start
(as some answers suggest) I get following error:. ERROR! The server quit without updating PID file (/opt/homebrew/var/mysql/MacBook-Air.local.pid).
I've tried many solutions, but non of them worked.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我修复了此错误
服务器退出而不更新PID
在mySQL版本8.0.18上尝试
sudo chown -r mysql:mysql xx/mysql
和sudo> sudo chmod 775 xx /mysql
'xx/mysql'是您的mysql home dir
i fixed this error
The server quit without updating PID
on mysql version 8.0.18try
sudo chown -R mysql:mysql xx/mysql
, andsudo chmod 775 xx/mysql
'xx/mysql' is your mysql home dir