Board logo

subject: How to retrieve data from corrupt or damaged MySQL tables [print this page]


How to retrieve data from corrupt or damaged MySQL tables

MySQL offers a much better performance as compared to other database management systems. It effectively solves the business needs of big enterprises and can efficiently handle large or bulky websites. It has got several distinguishing features, such as multiple native and custom storage engines to choose from, commit grouping etc. that make it one of the highly recommended databases for developing web applications. But despite of all these significant features, there is a limitation that this database is prone to corruption. Corruption may occur due to any reason, such as virus attack, forcibly quitting MySQL server, improper system shutdown, power surge, etc. All these factors would lead to a corrupt MySQL database and prevent you from accessing the data stored in tables and other database components. To overcome this problem, you need to go for MySQL recovery through a reliable third-party tool.

For instance, you may receive the following error message while trying to access a particular MySQL database table:

"Table 'tablename' is marked as crashed and last (automatic?) repair failed"

Cause:

The following reasons may have caused the above error:

An operating system error.

Hardware problems

Using 'myisamchk' utility on a live table.

Power failure could be a major reason behind the occurrence of such error.

The data or index files may be corrupt.

The above error may render the database and all its objects inaccessible ,and you will lose all the vital information stored therein. To recover MySQL database from such error and restore all its components, you can use an updated backup. If the backup is missing, you should follow the below mentioned resolution steps.

Resolution:

These steps will help you check and repair your corrupt database-

I. For analyzing and checking the damaged 'abc.myi' table, you can use the 'myisamchk' command-line utility or the Check Table SQL statement.

'myisamchk abc.myi'

Or

'Check Table abc'

II. For repairing the corrupt 'abc.myi' table, you can use the 'myisamchk' command-line utility or the Repair Table SQL statement.

'myisamchk -r q abc' (-r -q signify "quick recovery mode")

Or

'Repair Table abc'

If these resolution steps do not repair the corrupt MySQL table, you should take help of a comprehensive MySQL database recovery software. These software employ powerful scanning algorithms that can efficiently repair any corrupt MySQL database file created in InnoDB and MyISAM database engines.

Stellar Phoenix MySQL Database Recovery is a proficient tool that repairs corrupt MySQL tables and restores the repaired data in a new MySQL table. It enables you to perform a selective recovery of MySQL database components. It supports MySQL 3.x, 4.x, 5.x, and 6.x versions.




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0