(888) 411-2221 info@realx.com

A unique article I have came across which includes several things to study from. You will probably want to look it over to find out what you think.

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”

?

Cause:

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.

?

Resolution:

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] …

option = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED | CHANGED}

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:

REPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE

tbl_name [, tbl_name] …

[QUICK] [EXTENDED] [USE_FRM]

?

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.

My name is Mark Willium, I have done Ph.D in computer science and currently doing research on how to recover and repair corrupted mysql database. During research i found a third party repair mysql database software to repair corrupted mysql database.

Article source: http://mysql.ezinemark.com/using-mysql-recovery-utility-to-repair-damaged-myisam-5.0.4-table-167b630a28d.html.

I thought that was interesting. Feel free to leave your comments below.
Related MySQL Programming Articles