本地虚拟机(CentOS6.8)启动MySQL(MySQL5.6.35)服务失败
[root@VMUest ~]# service mysql status ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists [root@VMUest ~]# rm -f /var/lock/subsys/mysql [root@VMUest ~]# service mysql status ERROR! MySQL is not running [root@VMUest ~]# service mysql start Starting MySQL.170331 10:18:30 mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists. ERROR! The server quit without updating PID file (/usr/local/mysql/data/VMUest.pid).
前一天就折腾了mysqlsla,今天MySQL就启动不了。参考修改CentOS6.5主机名引起MySQL5.6.35服务问题里面的方法没有效果。各种纠结都没用,最后想起启动MySQL服务时,会优先在/etc/目录下查找my.cnf
[root@VMUest ~]# ll /etc/my.cnf -rw-r--r--. 1 root root 251 Jan 27 05:41 /etc/my.cnf [root@VMUest ~]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql
所有评论(0)