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

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


登录指定 -h ,可以登录进去
msyql -h 127.0.0.1

 

两种方法:1:修改配置文件。2:用软链接,

ln -s /opt/lampp/var/mysql/mysql.sock /var/lib/mysql/mysql.sock

posted @ 2022-04-21 11:38  漫步CODE人生  阅读(117)  评论(0编辑  收藏  举报