Kemarin rencana mau backup databse cacti menggunakan mysqldump, namun slalu muncul error sbb:
// mysqldump: Got error: 144: Table './cacti/poller_command' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES //
Maklum saya kurang paham dengan command database, apalagi sisuruh buat database (gak hobi),, haha.
Langsung aja cara penyelesaiannya.
aziz@cacti:~/backup$ mysql -u root -p
Enter password:
mysql> use cacti;
mysql> show tables;
mysql> check table poller_command;
+----------------------+-------+----------+---------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------------------+-------+----------+---------------------------------------------------+
| cacti.poller_command | check | warning | Table is marked as crashed and last repair failed |
| cacti.poller_command | check | warning | Size of indexfile is: 4096 Should be: 2048 |
| cacti.poller_command | check | error | Found 2 keys of 136 |
| cacti.poller_command | check | error | Corrupt |
+----------------------+-------+----------+---------------------------------------------------+
4 rows in set (0.00 sec)
mysql> repair table poller_command;
+----------------------+--------+----------+--------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------------------+--------+----------+--------------------------------------+
| cacti.poller_command | repair | warning | Number of rows changed from 136 to 2 |
| cacti.poller_command | repair | status | OK |
+----------------------+--------+----------+--------------------------------------+
2 rows in set (0.08 sec)
mysql> check table poller_command;
+----------------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------------------+-------+----------+----------+
| cacti.poller_command | check | status | OK |
+----------------------+-------+----------+----------+
1 row in set (0.00 sec)
mysql>
Akhirnya backup database menggunakan mysqldump, berjalan lancar.
Sumber = http://blog.ffff.ca/2008/09/17/recovering-a-crashed-mysql-table/