今天想把之前在cetnos6上编译安装的mariadb改下PATH环境变量,操作几次之后,关闭或重启mysql就失败了,提示如下:
[root@web1 ~]# service mysqld stop MySQL server PID file could not be found! [FAILED]
google了下,解决方案如下:
查看一下进程:
[root@web1 ~]# ps aux |grep mysq* mysql 16058 0.2 11.2 995540 112956 ? Sl 14:07 0:01 mysqld root 17233 0.0 0.0 103316 848 pts/2 S+ 14:16 0:00 grep mysq*
如果看到上面的内容,那说明,Mysql的进程卡死了,这时用就要把这些卡死的进程都关闭:
[root@web1 ~]# kill -9 16058 [root@web1 ~]# kill -9 17233 -bash: kill: (17233) - No such process
再启动Mysql 就行了;可以多重启几次,最后就成功启动了。
[root@web1 ~]# service mysqld stop MySQL server PID file could not be found! [FAILED] [root@web1 ~]# service mysqld restart MySQL server PID file could not be found! [FAILED] Starting MySQL.. [ OK ] [root@web1 ~]# service mysqld restart Shutting down MySQL. [ OK ] Starting MySQL.. [ OK ] [root@web1 ~]#
原创文章,作者:mississippi,如若转载,请注明出处:http://www.178linux.com/47050