それは突然やってきた
- 同僚がOSを再起動
- 普通に立ち上がってきたかのように見える
- 「クエリエラーなるんだけど?」
そして吐き出された大量のログ
150130 23:00:31 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './hoge/hoge.frm'
150130 23:00:31 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './hoge/hoge.frm'
150130 23:00:31 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './hoge/hoge.frm'
150130 23:00:31 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './hoge/hoge.frm'
150130 23:00:31 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './hoge/hoge.frm'
150130 23:00:31 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './hoge/hoge.frm'
150130 23:00:31 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './hoge/hoge.frm'
・
・
・
ググる
- innodbの場合、ib_logfile* を再作成すると直るかもという情報を得る
止まらないmysqld
とりあえずstopしてみた。
/etc/init.d/mysqld stop
何も出ない。止まらない。
違うコマンド試したら止まった。
mysqladmin -u root -p shutdown
祈りながらib_logfile*再作成
mv ib_logfile0{,_old}
mv ib_logfile1{,_old}
/etc/init.d/mysqld start
- 直った!
まとめ
- バックアップ大事