Sunday, February 14, 2010

Fixing “Unknown Table” Error post MySQL database corruption

InnoDB database engine saves all the data in the form of pages, linked in a B-tree structure. The pages in the B-tree structure are arranged in a way that each page has it entry in its Index node. These pages contain actual data stored in the InnoDB tables. Since these tables are updated very frequently, it requires special treatment to handle the B-tree structure. Corruption in this structure can occur due to various reasons like, MySQLD improper shutdown, virus attack, operating system malfunction, and human errors. In such situations, the data saved in the InnoDB table becomes inaccessible. To access the data after InnoDB corruption, a simple way is to restore the data from an updated backup. However, inaccessibility of table backup or backup falling short of restoring the required data, requires an advanced third-party MySQL Repair application.

As a practical case, you encounter the underneath error message while trying to access the InnoDB table:

“#1051 - Unknown table 'table name'”
'table name' is the name of the table which is corrupted

The above error message appears every time you attempt to access that table. It does not allow you to access the records saved in the table.

Cause:

The reason behind the above error message is corruption/damage in InnoDB table.

Resolution:

To isolate the above error message and to access the table records, use the below command:

“ innodb_force_recovery = 4 ”

The above command works in most cases. It comprehensively repairs the corrupted table and allows
makes all the records accessible. However, if the above command fails to repair the table and the above
error message persists, then you will need to use a powerful MySQL Repair application.

A Repair MySQL Database repair tool is a third-party application that scans the table by employing high-end scanning algorithms. The repair application is built with interactive user-documentation that makes even an novice user to understand and perform the repair process. These tools are completely non-destructive in nature as the repairing is performed without modifying the original data.

Stellar Phoenix Database Recovery For MySQL, a powerful application used world-wide by most of the MySQL database users, ensures complete repair of tables created in MyISAM or InnoDB storage engines. The MySQL Repair tool is designed for MySQL 5.x and 4.x. It is compatible with Windows 7, Vista, XP, 2003 and 2000 operating systems.

Resource Taken From :- http://www.articlesengine.com/Article/Fixing--Unknown-Table--Error-post-MySQL-database-corruption/503221/1

No comments:

Post a Comment