Board logo

subject: Fixing error #1142 Post Mysql Database Corruption [print this page]


MySQL database table corruption can occur due to various reasons, one of them being importing of incorrect table structure in the database. Once the database gets corrupted due to the above reason, it becomes unmountable. In most of these situations, you encounter an error message while trying to access or drop any MySQL database table. To overcome such database corruption situations, the user needs to run innodb_force_recovery command with an appropriate value. Although the command is successful in repairing MySQL table in most cases, it might fail to repair if the database table is severely damaged. For such cases, the user needs to restore the database table from an up-to-date backup. But, if in case of no database table availability or backup falling short to restore the exact table, then the user needs to search for a third-party MySQL Database Repair application that can repair all the tables.

To explain the above situation in detail, consider a below scenario where you have a MySQL database and attempt to import a table structure into it. However, after you have done so and try to access the records saved in the the database table, you encounter the below error message:

"error #1142 - SELECT command denied to user 'abc'@'localhost' for table 'test'"

Furthermore, you are also not able to delete the table as you encounter the below error message while running delete command:

"error #1142 - DROP command denied to user 'abc'@'localhost' for table 'test'"

Cause

The above error message appears when the MySQL database table is corrupted or damaged.

Resolution

To resolve the above error message and access the records saved in table, you will need to take underneath actions:

Try to repair the corrupt InnoDB table by using 'innodb_force_recovery=4' command. The command provides successful results in most situations.

However, if the database table remains corrupted even after using the above commands, then you will need to restore the data from an updated backup.

In case of no backup availability, you will need to repair the database by using an effective and secure repair mysql utility. Such MySQL Repair tools use effective repair tools to repair and restore damaged database due to logical corruption.

Database Recovery For MySQL provides complete repair of databases created by using MyISAM and InnoDB engines. This mysql database repair tool supportsMySQL 5.x and 4.x and can be installed on Windows 7, Vista, 2003, XP, and 2000.

by: Advika Singh




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