侧边栏壁纸
博主头像
Cherish博主等级

如果不是特别幸运,那么请特别努力!

  • 累计撰写 28 篇文章
  • 累计创建 16 个标签
  • 累计收到 3 条评论

Mac登录MySql错误解决办法

Cherish
2021-06-10 / 0 评论 / 0 点赞 / 442 阅读 / 732 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2021-09-12,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

网上找了许多教程,最终下面方法可行,特此记录。

~ mysql -u root -p
Enter password:
# 输入密码后报错
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
# 终端执行以下命令
~ sudo /usr/local/mysql/support-files/mysql.server start

Starting MySQL
.Logging to '/usr/local/mysql/data/zhengjiedeMac-mini.local.err'.
 SUCCESS!

再次登陆即可!

# 启动mysql
~ sudo /usr/local/mysql/support-files/mysql.server start
Starting MySQL
. SUCCESS!

# 查看mysql运行状态
~ sudo /usr/local/mysql/support-files/mysql.server status
Password:
Sorry, try again.
# 输入mac系统密码
Password:
 SUCCESS! MySQL running (2893)

~ sudo /usr/local/mysql/support-files/mysql.server status
 ERROR! MySQL is not running


# 关闭mysql
~ sudo /usr/local/mysql/support-files/mysql.server stop
Shutting down MySQL
. SUCCESS!

参考:https://blog.csdn.net/potato512/article/details/78564106

0
广告 广告

评论区