CA3LE Posted June 8, 2006 CID Share Posted June 8, 2006 I am repairing a corrupt database --- you may get errors over the next 20 minutes or so.... but it should be restored without any major issues. - Damon Link to comment Share on other sites More sharing options...
CA3LE Posted June 8, 2006 Author CID Share Posted June 8, 2006 See now that didn't hurt too bad... hehe mysql> CHECK TABLE Master FAST QUICK; +-----------------------+-------+----------+----------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +-----------------------+-------+----------+----------------------------------------------------------+ | testmyn_scores.Master | check | warning | Table is marked as crashed | | testmyn_scores.Master | check | warning | 2 clients are using or haven't closed the table properly | | testmyn_scores.Master | check | error | Found duplicated key at page 1170432 | | testmyn_scores.Master | check | error | Corrupt | +-----------------------+-------+----------+----------------------------------------------------------+ 4 rows in set (0.07 sec) mysql> REPAIR TABLE Master; +-----------------------+--------+----------+------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +-----------------------+--------+----------+------------------------------------------------+ | testmyn_scores.Master | repair | warning | Number of rows changed from 2141945 to 2006171 | | testmyn_scores.Master | repair | status | OK | +-----------------------+--------+----------+------------------------------------------------+ 2 rows in set (1 min 56.65 sec) mysql> optimize table Master; +-----------------------+----------+----------+----------+ | Table | Op | Msg_type | Msg_text | +-----------------------+----------+----------+----------+ | testmyn_scores.Master | optimize | status | OK | +-----------------------+----------+----------+----------+ 1 row in set (1 min 37.91 sec) mysql> Aborted root@s2 [~]# /etc/init.d/mysql restart; Killing mysqld with pid 13521 Wait for mysqld to exit........... done root@s2 [~]# root@s2 [~]# mysql testmyn_scores Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 107 to server version: 4.0.27-standard-log Type 'help;' or 'h' for help. Type 'c' to clear the buffer. mysql> CHECK TABLE Master FAST QUICK; +-----------------------+-------+----------+-----------------------------+ | Table | Op | Msg_type | Msg_text | +-----------------------+-------+----------+-----------------------------+ | testmyn_scores.Master | check | status | Table is already up to date | +-----------------------+-------+----------+-----------------------------+ 1 row in set (0.00 sec) mysql> Aborted root@s2 [~]# [/code] I just wonder how it became corrupt in the first place..... I think it's because I forgot to optimize the table last night after I removed about 200,000 entries from it (oops).. it's usually a good idea to optimize after that many rows of the database have been removed. But at least it was an easy fix, thanks for being patient with me. - Damon Link to comment Share on other sites More sharing options...
Recommended Posts