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

在Centos系统输入mysql回车出现以下错误的解决方法:

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


解决方法一:

如果是以yum方法安装:

直接service mysqld start启动后

再输入mysql命令可进入mysql数据库


你可能感兴趣的:(mysql)