当前位置:Gxlcms > 数据库问题 > Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

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

[root@obp-db-001 etc]# mysql -uroot
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)

解决办法:

ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

标签:err   socket   解决   root   .so   can   ln -s   error   server   

人气教程排行