How to repaire MySQL corrupted table
If you get an error message like this:
Table './labsupply/db_cache' is marked as crashed and should be repaired.
You can repair the table using the following steps:
1, Login to mysql
# mysql uroot -p
2, change database
mysql> use labsupply
Database changed
3, check table
mysql> check table db_cache;
+——————–+——-+———-+————————————————— ——-+
| Table | Op | Msg_type | Msg_text |
+——————–+——-+———-+————————————————— ——-+
| labsupply.db_cache | check | warning | Table is marked as crashed |
| labsupply.db_cache | check | warning | 3 clients are using or haven’t closed the table pr operly |
| labsupply.db_cache | check | status | OK |
+——————–+——-+———-+————————————————— ——-+
3 rows in set (0.03 sec)
4, repair table.
mysql> repair table db_cache;
+——————–+——–+———-+———-+
| Table | Op | Msg_type | Msg_text |
+——————–+——–+———-+———-+
| labsupply.db_cache | repair | status | OK |
+——————–+——–+———-+———-+
1 row in set (0.00 sec)
Tags: MySQL
resimler said,
March 23, 2008 @ 4:51 pm
Great Help , Thank you man
Best Regards.
kadin sitesi said,
March 23, 2008 @ 4:53 pm
Thanks