When using InnoDB storage engine, the ibdata files serve as system tablespace containers. Along with internal system information, these files might also contain user indexes and data. If any of these file(s) get corrupt, the entire database can go inaccessible. The article mentions one of such possible scenarios and then solutions that can help you to Repair MySQL Database.
For more clarification, consider a case when a server running MySQL on InnoDB engine experiences unexpected power failure. Then when you try to start MySQL database, could not it run and behave abruptly. When viewing the log report for the behavior that you observe the following entries, each with time stamps and Server Name:
"InnoDB: The log sequence number in ibdata files with
InnoDB: The log sequence number in the ib_logfile!
InnoDB: Database was not shut down normally
InnoDB: Starting crashRecovery.
InnoDB: Reading tablespace information from the.ibd files ...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer ...
InnoDB page corruption directly: supremum not sharp .. "
The above symptoms indicate corruption in MySQL database table, the power failure may have occurred due to unexpected last. Specifically, have the ibdata file (s) away damaged.
Solution
If you encounter or abovesimilar problems, one of the appropriate methods to solve it try:
Check for the latest available backup and restore your database.
When backup is incomplete, try to repair the database 'innodb_force_recovery = 4 "repair command. However, the command fails with if the extent of corruption is high.
If InnoDB repair command fails, you can ibdata tablespace and again after shutting down the server if possible.Alternatively, you can rename and ibdata ib_log files. But that leads to data loss. If this is not a suitable method, try the next solution.
To repair the damaged database MySQL, you use a third-mysql repair utility. These are special tools to repair MySQL database by the effective and secure scanning algorithms. Since they are equipped with an interactive design, the user, even without technical knowledge, they caneasily.
No comments:
Post a Comment