ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

记录Mysql问题

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

我所遇到的是权限问题

[root@server2 ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@server2 ~]# chown -R mysql:mysql /var/lib/mysql
[root@server2 ~]#  /etc/init.d/mysqld start

就两步解决!

没有更多推荐了,返回首页