可以连接到Mac Monterey上的Homebrew安装的MySQL

发布于 2025-02-03 08:51:09 字数 499 浏览 2 评论 0原文

我使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光病人 2025-02-10 08:51:09

我修复了此错误服务器退出而不更新PID在mySQL版本8.0.18上

尝试sudo chown -r mysql:mysql xx/mysqlsudo> 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.18

try sudo chown -R mysql:mysql xx/mysql, and sudo chmod 775 xx/mysql

'xx/mysql' is your mysql home dir

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文