more /var/log/mysqld.log
080510 4:26:26 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:26:26 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:26:26 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:26:26 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:26:29 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:26:29 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:27:02 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:27:02 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:27:26 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:27:26 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:27:36 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:27:36 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:27:46 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
080510 4:27:46 [ERROR] /usr/libexec/mysqld: Can’t open file: ‘whos_online.MYI’ (errno: 145)
在錯誤記錄檔後面有個 errno: 145,這個 145 的數字可以使用 perror 這指令來得知它代表的意思為何
直接下 perror 145
MySQL error code 145: Table was marked as crashed and should be repaired
就可得到 MySQL 給你的提示
接著就登入 MySQL 進行修復的動作
mysql> repair table whos_online;
就 OK 啦
至於 perror 是什麼咧
PERROR(1) MySQL Database System PERROR(1)
NAME
perror – explain error codes
而 perror 是包在 mysql-server 套件裡的
# rpm -qf `which perror`
mysql-server
留言