当前位置:Gxlcms > 数据库问题 > 解决连接mysql时报错"Can't connect to local MySQL server through socket '/tmp/mysql.sock'"

解决连接mysql时报错"Can't connect to local MySQL server through socket '/tmp/mysql.sock'"

时间:2021-07-01 10:21:17 帮助过:4人阅读

命令行连接mysql时,报了“Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘”的错误;用Navicat连接是报62号错误。

首先确定我本机是装了mysql的

技术分享

尝试用安全模式启动mysql,命令行执行:

/usr/local/bin/mysqld_safe

完了之后运行mysql,成功了。

解决连接mysql时报错"Can't connect to local MySQL server through socket '/tmp/mysql.sock'"

标签:

人气教程排行