Databases Reference
In-Depth Information
$ myisamchk --check /var/lib/mysql/music/artist.MYI
Checking 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 1
Key 1 - Found wrong stored record at 0
Found block with too small length at 3060; Skipped
Found block that points outside data file at 19024
Found block that points outside data file at 19824
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 22860
Found block that points outside data file at 23344
Found block that points outside data file at 30836
Found block with too small length at 30980; Skipped
Found block that points outside data file at 32628
Found block that points outside data file at 32868
Found block that points outside data file at 33660
Found block that points outside data file at 33752
Data records: 0
Now, let's see if this had the desired effect:
$ myisamchk --check /var/lib/mysql/music/artist.MYI
Checking 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 links
The error has been fixed, but, of course, some data could have been lost as a result of
the problem.
 
Search WWH ::




Custom Search