Using Mysql Recovery Utility To Repair Damaged Myisam 5.0.4 Table

by markwillium - Date: 2010-09-23 - Word Count: 429 Share This!

The MyISAM table in the MySQL database is the default type of database engine. This table stores the data in three types of files: .frm file to store the table format, .myd file to store the data, and the .myi file to store the index file. If any of these three files get damaged due to any sundry reason such as many users modifying the table simultaneously, virus infections, abrupt system shutdown, etc. MySQL provides several utilities to recover MySQL tables. However, if these tools do not work for the MySQL table you are using, then you should use a third-party MySQL repair software to repair MySQL database.

Let us take a practical situation in which you are facing the following error message while working on the MySQL 5.0.4 database table:

"MySQL error code 126: Index file is crashed"

The most possible cause of this problem is that the MyISAM table has damaged, which is why you are unable to access and/or work on the table.

To resolve this problem, you should perform the following methods to recover MySQL table and use it once again:
Using 'myisamchk' utility: You should use the 'myisamchk' command to check and repair the damaged MySQL table by using the following MySQL repair syntax:
myisamchk -r
This command is used to remove the incorrect and deleted rows in the data file. Also, it reconstructs the index file.
Using Check table/Repair table: You should use the 'Check Table' tool to check the MyISAM table for errors using the following syntax:
CHECK TABLE tbl_name [, tbl_name] ... [option] ...
After detecting errors in the table, you should use the 'Repair Table' tool to repair MySQL table. For this, you can use the following syntax:
tbl_name [, tbl_name] ...

Try to reproduce the steps that caused the error message to be displayed. If the error does not appear, then the MyISAM table is repaired. However, if the error appears again then the MySQL table is severely damaged. The use of a third-party MySQL repair software is the best bet in such cases. The use of highly intense and safe scanning algorithms along with rich user interface results in safe and easy MySQL recovery.

In such cases, the best software that I would suggest you is Stellar Phoenix Database Recovery for MySQL, which repairs MySQL database in MySQL 3.x, 4.x, 5.x, and 6.x versions. With the ability to repair MySQL files such as .ibdata, .ibd, .myd, .myi, .frm, etc from both InnoDB and MyISAM database engines, this MySQL recovery utility is compatible with Windows 7, Vista, Server 2003, XP, and 2000.

Related Tags: mysql repair, repair mysql, recover mysql, repair mysql database, mysql recovery

Your Article Search Directory : Find in Articles

© The article above is copyrighted by it's author. You're allowed to distribute this work according to the Creative Commons Attribution-NoDerivs license.

Recent articles in this category:

Most viewed articles in this category: