$
myisamchk -check /var/lib/mysql/music/artist.MYIChecking MyISAM /var/lib/mysql/music/artist.MYI
Data records 87 Deleted blocks 0
-
check file-size-
check record delete-chain-
check key delete-chain- check index reference- check data record references index 1
myisamchk: error Can't read indexpage from filepos: 1024
- check record links myisamchk: error Found wrong record at 0
MyISAM-table '/var/lib/mysql/music/artist.MYI' is corrupted
Fix it using switch "r" or "-o"
Let’s
try to repair the table myisamchk -recover /var/lib/mysql/music/artist.MYI- recovering (with sort) MyISAM-table '/var/lib/mysql/music/artist.MYI'
Data records 87
- Fixing index Key 1 - Found wrong stored record at Found block with too small length at 3060; Skipped
Found block that points outside data file at Found block that points outside data file at Found block with too small length at 20052; Skipped
Found block with too small length at 20636; Skipped
Found block that points outside data file at Found block that points outside data file at Found block that points outside data file at Found block with too small length at 30980; Skipped
Found block that points outside data file at Found block that points outside data file at Found block that points outside data file at Found block that points outside data file at Data records Now, let’s see if
this had the desired effect myisamchk -check /var/lib/mysql/music/artist.MYIChecking MyISAM /var/lib/mysql/music/artist.MYI
Data records 0 Deleted blocks 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference- check data record references index 1
-
check record linksThe error has been fixed, but, of course, some data could have been lost as a result of the problem.
368 | Chapter 10:Share with your friends: