UUG MySQL guru friends: I have a mysql database table (let's call it Recover) inside database test, that seems to have been corrupted.
When I do I "myisamchk Recover", it says there are errors. "myisamchk -o Recover" says it fixes them, but does not. "myisamchk -r Recover" seems to fix the problem(i.e. I can query on the table) but in the process, it whittles the table from 460 rows to 419. I would really like to have those missing rows back. ideas? MRB ========================================================= # cd /var/lib/mysql/test # ls Recover.frm Recover.MYD Recover.MYI [EMAIL PROTECTED] test]# ls -al total 204 drwx------ 2 mysql mysql 4096 Jul 14 17:17 . drwxr-xr-x 6 mysql mysql 4096 Jun 12 14:30 .. -rw-r----- 1 root root 9928 Jul 14 17:17 Recover.frm -rw-r----- 1 root root 176128 Jul 14 17:17 Recover.MYD -rw-r----- 1 root root 6144 Jul 14 17:17 Recover.MYI # myisamchk Recover Checking MyISAM file: Recover Data records: 460 Deleted blocks: 0 myisamchk: warning: Table is marked as crashed myisamchk: warning: 3 clients is using or hasn't closed the table properly - check file-size myisamchk: error: Size of datafile is: 176128 Should be: 176456 - check key delete-chain - check record delete-chain - check index reference - check data record references index: 1 myisamchk: error: Found key at page 5120 that points to record outside datafile - check record links myisamchk: error: Recordlink that points outside datafile at 176056 MyISAM-table 'Recover' is corrupted Fix it using switch "-r" or "-o" # myisamchk -o Recover - recovering (with keycache) MyISAM-table 'Recover.MYI' Data records: 460 Found block that points outside data file at 175756 Found block that points outside data file at 176024 Data records: 459 # myisamchk Recover Checking MyISAM file: Recover Data records: 459 Deleted blocks: 0 - check file-size - check key delete-chain - check record delete-chain - check index reference - check data record references index: 1 - check record links # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 28153 to server version: 3.23.58 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use test; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Didn't find any fields in table 'Recover' Database changed mysql> show tables; +----------------+ | Tables_in_test | +----------------+ | Recover | +----------------+ 1 row in set (0.00 sec) mysql> select * from Recover; ERROR 1017: Can't find file: './test/Recover.frm' (errno: 13) ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
