今天想把之前在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.www58058.com/47050