页首Html代码

Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/data/VM_0_6_centos.pid)

刚接触MySql数据库,参考一些文章后搭建起来了也创建了数据库,程序跑到很好,一觉醒来突然连接不上了 MySql数据库了。

研究了好一会才找到原因。

现象:

登录数据库失败

[root@VM_0_6_centos ~]# mysql -u root -p******
Warning: Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

数据库服务重启也失败

[root@VM_0_6_centos ~]# /etc/init.d/mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL.... ERROR! The server quit without updating PID file (/usr/local/mysql/data/VM_0_6_centos.pid).

查看MySql线程并杀死

[root@VM_0_6_centos ~]# ps -ef|grep mysqld
root 803 32742 0 20:45 pts/0 00:00:00 grep --color=auto mysqld

[root@VM_0_6_centos ~]# kill -9 803
-bash: kill: (803) - No such process
[root@VM_0_6_centos ~]# kill -9 32742

* SSH connection closed *
* Connection closed *
* Socket connection established *
Last failed login: Tue Nov 6 20:46:12 CST 2018 from 58.218.92.46 on ssh:notty
There were 63 failed login attempts since the last successful login.
Last login: Tue Nov 6 20:43:16 2018 from 119.29.96.147

重启后还是同样的问题,检查MySql日志 /usr/local/mysql/data/VM_0_6_centos.err

2018-11-06 20:55:02 1764 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable 'lower_case_file_system=1'
2018-11-06 20:55:02 1764 [ERROR] Aborting

才想起来前一晚为解决数据库大小写敏感问题在下面两个文件添加了lower_case_file_system=1

/usr/local/mysql/my.cnf
/etc/my.cnf.d/mysql-cient.cnf

删除后重启service,问题解决!

[root@VM_0_6_centos ~]# /etc/init.d/mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL. SUCCESS!

posted @ 2018-11-06 21:14  binsite  阅读(4602)  评论(0编辑  收藏  举报

页脚Html代码