How to repaire MySQL corrupted table

No GoodNeed ImprovementOKGoodExcellent (1 votes, average: 5 out of 5)
Loading ... Loading ...

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)


Popularity: 3%

2 Comments »

  1. resimler said,

    March 23, 2008 @ 4:51 pm

    Great Help , Thank you man
    Best Regards.

  2. kadin sitesi said,

    March 23, 2008 @ 4:53 pm

    Thanks

RSS feed for comments on this post · TrackBack URI

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word