Can’t connect to local MySQL server through socket ‘/tmp/mysql/mysql.sock’解决方法
2015-04-18 12:05
639 查看
原因在于/tmp/mysql/mysql.sock不存在,为/usr/local/mysql/mysql.sock建立一个软连接到/tmp/mysql/mysql.sock即可。
也有可能是/tmp/mysql/mysql.sock存在,但权限不对,可以用以下命令修改权限
ln -s /usr/local/mysql/mysql.sock /tmp/mysql/mysql.sock
也有可能是/tmp/mysql/mysql.sock存在,但权限不对,可以用以下命令修改权限
Chown -R mysql:mysql /tmp/mysql
相关文章推荐
- mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' 解决方法
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法
- 解决mysql启动问题: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- 解决*unix系统下Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- Can't connect to local MySQL server through socket '/tmp/mysql.sock'解决
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ 解决方法
- Mysql -- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法
- 亲测有效,解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) ";
- 解决 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)的方法
- 解决“ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (60)”
- 解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) ";
- 解决ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- 解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) "
- 解决“ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)”
- 解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误
- 解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误
- 解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) ";
- centos7 安装mysql 报错:亲测有效,解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2)
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法 + Linux启动/停止/重启Mysql数据库的方法