Server power failure mysql #2006 MySQL server has gone away restore frm ibd file damage repair INNODB storage engine table damage repair

mysql #2006 MySQL server has gone away frm ibd file damage repair.

InnoDB: Error: page 7 log sequence number 2228559452

InnoDB: is in the future! Current system log sequence number 567735873.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2021-03-03 22:20:26 4d00 InnoDB: Error: page 2 log sequence number 3706493104
InnoDB: is in the future! Current system log sequence number 567735873.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.

 

Case deal]

Suppose you are running MySQL using InnoDB tables, bad hardware, and the server is powered off

Driver errors, kernel errors, unfortunate power failures or some rare MySQL errors have damaged your InnoDB tablespace.

When the parameter value is greater than 0, select, create, and drop operations can be performed on the table, but operations such as insert, update, or delete are not allowed.

1 (SRV_FORCE_IGNORE_CORRUPT): Ignore the corrupt page that was checked.

2 (SRV_FORCE_NO_BACKGROUND): Prevent the main thread from running. If the main thread needs to perform a full purge operation, it will cause a crash.

3 (SRV_FORCE_NO_TRX_UNDO): Do not perform transaction rollback operations.

4 (SRV_FORCE_NO_IBUF_MERGE): Do not perform the merge operation of the insert buffer.

5 (SRV_FORCE_NO_UNDO_LOG_SCAN): Without viewing the redo log, the InnoDB storage engine will treat uncommitted transactions as committed.

6(SRV_FORCE_NO_LOG_REDO): Do not perform roll-forward operations.
————————————————

The customer inquired about the settlement period of the statement and the situation was urgent, so he asked us for help.

The customer submits the A/C set of documents and we test!

Out of respect for customers, I worked overtime for 10 minutes and always solved the problem satisfactorily.

【problem analysis】

According to customer feedback, the file was shut down abnormally due to a power outage, after it was turned on. That's all.

Preliminary judgement, the power failure of the disk has bad sectors, which caused the database to be damaged.

 

[Rough solution idea]

1. Of course, the first thing is to back up the data in time. You can play it any way you want, and you must back up the entire DATA folder.

2. Disconnect all client connections. Forbid other clients to write new data to prevent data loss caused by rollback.

3. Contact professionals to solve the problem thoroughly. [email protected]


————————————————
Copyright Statement: This article is the original article of the CSDN blogger "q_q275835897", and it follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement for reprinting. .
Original link: https://blog.csdn.net/cmddate/article/details/107335710
————————————————

Guess you like

Origin blog.csdn.net/cmddate/article/details/114338586