Cronからmysqlに関するエラーメールが届いた
mysqldump: Got error: 145: Table ‘./nucleus/nucleus_plugin_counter’ is marked as crashed and should be repaired when using LOCK TABLES
更新が止まってる状態の「あにょのブログ」のカウンターのところにもエラーメッセージが・・・
mySQL error with query SELECT * FROM nucleus_plugin_counter ORDER BY count_time DESC LIMIT 1: Table ‘./nucleus/nucleus_plugin_counter’ is marked as crashed and should be repaired
どうやらカウンターのデータベースが壊れたようだ
■ データベースのエラーを確認
[root@server1 ~]# mysql -u root -pパスワード Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45165 Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. ■ 問題のデータベースに接続 mysql> use nucleus; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed ■ エラーチェック mysql> check table nucleus_plugin_counter; +--------------------------------+-------+----------+----------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------------------------------+-------+----------+----------------------------------------------------------+ | nucleus.nucleus_plugin_counter | check | warning | Table is marked as crashed | | nucleus.nucleus_plugin_counter | check | warning | 2 clients are using or haven't closed the table properly | | nucleus.nucleus_plugin_counter | check | error | Found 13708 keys of 13709 | | nucleus.nucleus_plugin_counter | check | error | Corrupt | +--------------------------------+-------+----------+----------------------------------------------------------+ 4 rows in set (0.01 sec) ■ 壊れているテーブルを修復 mysql> repair table nucleus_plugin_counter; +--------------------------------+--------+----------+--------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------------------------------+--------+----------+--------------------------------------------+ | nucleus.nucleus_plugin_counter | repair | warning | Number of rows changed from 13709 to 13707 | | nucleus.nucleus_plugin_counter | repair | status | OK | +--------------------------------+--------+----------+--------------------------------------------+ 2 rows in set (0.12 sec) ■ 修復できたか確認 mysql> check table nucleus_plugin_counter; +--------------------------------+-------+----------+----------+ | Table | Op | Msg_type | Msg_text | +--------------------------------+-------+----------+----------+ | nucleus.nucleus_plugin_counter | check | status | OK | +--------------------------------+-------+----------+----------+ 1 row in set (0.01 sec) mysql>exit
問題なく修復できたようだ。
ブログのカウンター表示も元に戻った。