Board logo

subject: Mysql Log Displays Error 126 [print this page]


MySQL log is the best way to identify the problems encountered by MySQL user while starting, closing, or running MySQLD (MySQL Server). These log files are saved in MySQLD data directory and can be erased using FLUSH LOGS command. The information saved in these files can also be used to check the exact reason for database table corruption. In most cases, this informations proves fruitful and allows the user to repair the table. However, there are some situations, where the user is unable to repair the table and the records saved in it remain inaccessible. To get past such situations, an ideal option is to restore the table from an updated backup. However, if a comprehensive database table backup does not exist, then you will need to repair the database using a powerful MySQL Repair application.

To elaborate the above case, consider a practical scenario where your MyISAM table gets corrupted and becomes unreadable. On viewing the MySQL log, you view the below error message:

Got error 126 when reading table './mysql/user'

Cause:

Corruption in MyISAM table can occur due to various reasons like MySQLD damage, virus infection, improper system shutdown, and concurrent modification of the table by two or more users.

Resolution:

To resolve the above error message and to access the database table records, adopt the below measures:

1.Try and repair the table using 'myisamchk -r' command.

2.In case the above command fails, then use below mentioned commands to repair your table:

CHECK TABLE TABLENAME;

REPAIR TABLE TABLENAME;

In most cases, either of the above steps work and the issue gets resolved. However, in case both the commands fall short of performing repair, then you will need to restore the table from a valid backup. But, if the table backup is unavailable or corrupt, then you will need to use a third-party Repair MySQL Database application.

A MySQL Repair tool incorporates intensive repair procedures that systematically repair every MyISAM table, irrespective of the cause of its damage. The repaired table can be previewed and can be saved at a new or default location.

MySQL guarantees complete repair of tables created in MyISAM and InnoDB database. The MySQL Database Repair utility does not change the original database records and keeps it intact. Supported by MySQL 5.x and 4.x, the easy-to-understand software is designed for Windows 7, Vista, 2003, XP, and 2000.

by: Naveen Kadian




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