当前位置:Gxlcms > 数据库问题 > 在/etc/my.cnf未配置 [clIent] 导到mysql找不到socket

在/etc/my.cnf未配置 [clIent] 导到mysql找不到socket

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

 

[root@DB mysql-5.6.16]# ./bin/mysql
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)

 在/etc/my.cnf增加[clIent]并指定socket

[root@DB mysql-5.6.16]# grep client -C 2 /etc/my.cnf
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[client]
socket=/var/lib/mysql/mysql.sock

 

在/etc/my.cnf未配置 [clIent] 导到mysql找不到socket

标签:.so   grep   socket   err   pre   connect   bin   local   mysqld   

人气教程排行