MySQL InnoDB now has error after Windows 10 update

All we need is an easy explanation of the problem, so here it is.

These two things are seemingly unrelated, but I have just done a Windows update, and all of a sudden, MariaDB won’t start up. I get the following errors:

InnoDB: using atomic writes.
2021-08-11 14:10:20 0 [Note] InnoDB: Uses event mutexes
2021-08-11 14:10:20 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-08-11 14:10:20 0 [Note] InnoDB: Number of pools: 1
2021-08-11 14:10:20 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-08-11 14:10:20 0 [Note] InnoDB: Initializing buffer pool, total size = 4294967296, chunk size = 134217728
2021-08-11 14:10:20 0 [Note] InnoDB: Completed initialization of buffer pool
2021-08-11 14:10:20 0 [Note] InnoDB: 128 rollback segments are active.
2021-08-11 14:10:20 0 [ERROR] InnoDB: Page [page id: space=0, page number=829] log sequence number 294540333006 is in the future! Current system log sequence number 276853913212.
2021-08-11 14:10:20 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
2021-08-11 14:10:20 0 [ERROR] InnoDB: Page [page id: space=0, page number=349] log sequence number 294540502122 is in the future! Current system log sequence number 276853913212.
2021-08-11 14:10:20 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
2021-08-11 14:10:20 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-08-11 14:10:20 0 [Note] InnoDB: Setting file '\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-08-11 14:10:20 0 [Note] InnoDB: File '\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-08-11 14:10:20 0 [Note] InnoDB: 10.5.9 started; log sequence number 276853913200; transaction id 35725767
2021-08-11 14:10:20 0 [Note] InnoDB: !!! innodb_force_recovery is set to 1 !!!
2021-08-11 14:10:20 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-08-11 14:10:20 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-08-11 14:10:20 0 [Note] Server socket created on IP: '127.0.0.1'.

I shut down MySQL and Apache (I am using XAMPP) before restarting after the Windows updates. The update that was ran was this one: "Feature update to Windows 10, version 20H2"

I have no idea where to even look at troubleshooting – any ideas? I googled the error "log sequence number is in the future" and found two articles, but no solutions.

My Windows Application Error log is flooded with entries, ranging from "Failing to create new master file" to "mismatched column names".

Any hints? I am afraid I may have lost data which could be very disastrous.

EDIT: I follwed the suggested answer, and did not get it fixed. Not even innodb_force_recovery=6 solves it. I am using MariaDB 10.5.19.

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

Thanks for the comments. I got the issue resolved by deleting all files in the data folder of MySQL, with the exception of the ibdata1 file and the ib_logfile0. Restarted MySQL and it worked.

The reason why I tried that is because I was about to restore a backup of about a month ago, and saw that these files were not present in that backup, so I tried. If someone knows why that worked, it would be great to get some insight, but it worked.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply