最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Mac中dmg安装mysql后登录出错:ERROR 2002 HY000 Can’t connect to local MySQL server through socket /tmp/mysql.sock 61

Mac crifan 2063浏览 0评论

折腾:

【已解决】Mac中mysql中创建数据库出错:ERROR 1006 HY000 Can’t create database errno 230174752

期间,已经彻底删除了mysql了。

重新用dmg去安装了mysql了。

去登录,结果失败:

<code>➜  ~ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
</code>

ERROR 2002 HY000 Can’t connect to local MySQL server through socket /tmp/mysql.sock 61

Mac下Mysql启动异常[“ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)”] – HuijunZhang – 博客园

macos – Mac上MySQL报错:ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ – SegmentFault 思否

macos – For a newbie: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ – Stack Overflow

好像是没有mysql启动服务,去启动,结果启动也出错:

【已解决】Mac中启动mysql出错:ERROR The server quit without updating PID file

【总结】

此处,具体过程很麻烦。

总之感觉是:

好像是重新安装的mysql的目录权限有问题。

经过一番折腾:

【已解决】Mac中启动mysql出错:ERROR The server quit without updating PID file

终于可以正常启动和登录数据库了。

转载请注明:在路上 » 【已解决】Mac中dmg安装mysql后登录出错:ERROR 2002 HY000 Can’t connect to local MySQL server through socket /tmp/mysql.sock 61

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
89 queries in 0.159 seconds, using 22.07MB memory