1. 程式人生 > >遇到的問題---mysql 啟動錯誤-server PID file could not be found

遇到的問題---mysql 啟動錯誤-server PID file could not be found

[[email protected] var]# service mysqld stop MySQL manager or server PID file could not be found!       [FAILED] 解決辦法: 首先檢視一下程序 [[email protected]irxpert-test/]# ps aux |grep mysq* root    10274  0.0  0.0  68160  1336 ?        S    13:43   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/irxpert-test.pid
mysql
    10353  0.0  1.0 344360 39464 ?        Sl   13:43   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/irxpert-test.err --pid-file=/var/lib/mysql/irxpert-test.pid
root     11884  0.0  0.0  63384   760 pts/1    S+   15:44   0:00 grep mysq* 如果看到上面的內容,那說明,
Mysql的程序卡死了,這時用就要把這些卡死的程序都關閉 [[email protected] mysql]# kill10274 [[email protected] mysql]# kill10353 啟動Mysqlok [[email protected] mysql]# service mysql start Starting MySQL.                                            [  OK  ] 如果殺掉程序之後還是不行。 具體要看報錯資訊 如果沒有指定日誌路徑 一般在是 /data/mysql 中的localhost.err檔案中可以看到資訊。 如果執行緒中無死程序 可以先看 service mysql status 看下狀態 根據提示刪掉多餘的東西  進入/data/mysql 也就是你的資料庫目錄 把多餘的刪除,包括localhost.err 和其他 index等東西
如果 多重啟幾次  一直執行 service mysql start 就可以重啟成功了