When MyISAM table in the MySQl which is the default type database engine get corrupted, users encounter with error message and lots of problem while working with MySQL 5.0.4 database table.
"MySQL error code 126: Index file is crashed"
After getting this error you are likely not to work or access any table. This is due to the reason of corruption or damage of MyISAM table.
MyISAM table is the default type of database engine in MySQL database. It is table which stores the data in three types of files: .frm file which is to store the table format, .myd file which is to store the data, and the .myi file to store the index file.
If due to any reason any of the file get corrupted or damaged like virus or malware attack, power failure, abrupt system shutdown etc. In this condition, users are not able to access database table. You need to fix this MyISAM table
For the resolution of this problem, here are the following methods to recover MySQL table and make it accessible once again.
- use the ‘myisamchk' command to check and reapir damaged MySQL table. For this here is the syntax—
myisamchk -r
This is the command which is used to remove the incorrect and deleted rows in the data file and also it reconstruct the index file.
- Use command to check MyISAM table for errors. This is the syntax –
CHECK TABLE tbl_name [, tbl_name] ... [option] ...
option = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED | CHANGED}
After finding out error try to repair it by following command--
REPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE
tbl_name [, tbl_name] ...
[QUICK] [EXTENDED] [USE_FRM]
After this, try to open MySQL database table once again, if it doesnot appear then it means there is no corruption in database table but if still you are getting the error message means there are some in the table and you need to look for the another solution to repair.
User professional third party MySQL repair software to repair corrupted or damaged MySQL database table. This is designed with such an algorithm which can repair corrupted file without any problem easily and efficiently and without making any difference in the data stored in the table. This utility is compatible with Windows 7, XP, Vista , Server 2003, XP, and 2000.