Starting MySQL:mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists.

mysqld_safe Directory ‘/var/lib/mysql’ for UNIX socket file don’t exists.

链接mysql数据库报:

ERROR 2002: Can't connect to local MySQL server through socket

进入linux重启mysql数据库报:

'mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists.

启动MySQL服务时,会优先在/etc/目录下查找my.cnf,所以把这个文件重命名或删除重启服务就好了

[root@VMUest ~]# service mysql start

详情查看原博客,博主写的很详细

你可能感兴趣的:(Starting MySQL:mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists.)