欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ERROR 2002 (HY000): Can't connect to local 博客分类: mysql  

程序员文章站 2024-02-26 12:44:46
...
错误
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

解决
vi /etc/my.cnf

[client] 
socket=/usr/local/mysql/mysql.sock
#socket=/var/lib/mysql/mysql.sock