ERROR! MySQL is running but PID file could not be found ?
出現這個問題原因很多
最常見的通常是PID進程未全部關閉
比如啓動safe
mysqld進程後
未關閉
運行 /etc/init.d/mysql
status
會提示
ERROR! MySQL is running but PID file could not be found
先打印MYSQL進程
ps aux | grep mysql
然後KILL進程
kill -9 pid1 pid2 …
在啓動MYSQL
/etc/init.d/mysql start
在檢查
/etc/init.d/mysql status
SUCCESS! MySQL running (10021)
這個只是其中一個原因
還有其他的 大部分的錯誤可以在日誌裏查看到
Centos mysql的日誌
在/var/lib/mysql/主機頭名稱xxx.err