MySQL Server organizes its data files as a single unit and their locations are allocated as per database instance. All MySQL instance data files are located in a single file system directory, usually called Data. These data files hold records. But sometimes, MySQL Server reports errors that it has found a key at a page which references a record lying outside the data file. Such kinds of errors generally indicate the specific table is corrupted and needs to be repaired. In critical situations (generally when MySQL repair utility fails to repair the database), you require using your recent database backup to restore. But many times, you don’t have clean database backup that could perform complete restoration. Such situations necessitate the use of
MySQL Recovery products as the effective database repair solution.
As an example, you might receive the below error message with your MySQL Server database:
warning:
clients are using or haven't closed the table properly
error : Found key at pagethat points to record outside datafile
error : Corrupt
This error is specific to MyISAM database engine and is encountered when you run mysqlcheck -u {USERNAME} {DATABASE} [TABLE] command to check the consistency of the database table. Where, DATABASE and TABLE refers to the name of specific database and table, respectively.
Cause
MyISAM database table is corrupted. The most probable reason for this error to occur is unexpected shutdown. Another possibility is that database is opened at various users’ ends.
Solution
Before making any database repair action, make sure that the database is properly closed at all the ends. You also need to ensure that the server is shut down or in other words, all the tables are inactive. To perform MyISAM database table repair, issue the following command:
mysqlcheck -r -u {USERNAME} {DATABASE} [TABLE]
Next, rerun the mysqlcheck -u {USERNAME} {DATABASE} [TABLE] command to check if table corruption goes away. If the issue persists, restore from backup or make use of MySQL database recovery applications. Built with powerful database repair technology, these MySQL Recovery applications provide effective and safe recovery of damaged MySQL database and its objects.
Stellar Phoenix Database Recovery For MySQL is a comprehensive MySQL Database Recovery utility that provides safe and instant database repair. It supports MySQL Server 4.x and 5.x. It provides complete recovery for InnoDB (.ibdata, .ibd and .frm) and MyISAM (.myd, .myi and .frm) files. It can recover databases created on Windows and Linux platforms. The software is compatible with Windows Vista, XP, 2003 and 2000.