一週間ほど前からxamppのmysqlで「log sequence number is in the future」のエラーが頻発しております。一時はmysqlが起動できない状態でしたが、現在は新しいxamppに入れ直してmysqlは何とか起動しています。
しかし、mysql_error.logを見ると相変わらず「log sequence number is in the future」のエラーが存在します。このままではまた、数日するとmysqlが起動しなくなるかもしれないので、何とか解決すべく質問させていただきました。
これは現在のエラー内容になります。↓↓↓
2023-10-24 17:31:05 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2023-10-24 17:31:05 0 [Note] InnoDB: Uses event mutexes 2023-10-24 17:31:05 0 [Note] InnoDB: Compressed tables use zlib 1.2.12 2023-10-24 17:31:05 0 [Note] InnoDB: Number of pools: 1 2023-10-24 17:31:05 0 [Note] InnoDB: Using SSE2 crc32 instructions 2023-10-24 17:31:05 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M 2023-10-24 17:31:05 0 [Note] InnoDB: Completed initialization of buffer pool 2023-10-24 17:31:05 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=109758264 2023-10-24 17:31:05 0 [ERROR] InnoDB: Page [page id: space=0, page number=302] log sequence number 539820803 is in the future! Current system log sequence number 109758282. 2023-10-24 17:31:05 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. 2023-10-24 17:31:05 0 [ERROR] InnoDB: Page [page id: space=0, page number=303] log sequence number 539820779 is in the future! Current system log sequence number 109758282. 2023-10-24 17:31:05 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. 2023-10-24 17:31:05 0 [ERROR] InnoDB: Page [page id: space=0, page number=304] log sequence number 539820791 is in the future! Current system log sequence number 109758282. 2023-10-24 17:31:05 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. 2023-10-24 17:31:06 0 [Note] InnoDB: 128 out of 128 rollback segments are active. 2023-10-24 17:31:06 0 [ERROR] InnoDB: Page [page id: space=0, page number=305] log sequence number 539820815 is in the future! Current system log sequence number 109758282. 2023-10-24 17:31:06 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. 2023-10-24 17:31:06 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2023-10-24 17:31:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2023-10-24 17:31:06 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2023-10-24 17:31:06 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB. 2023-10-24 17:31:06 0 [Note] InnoDB: Waiting for purge to start 2023-10-24 17:31:06 0 [Note] InnoDB: 10.4.27 started; log sequence number 109758273; transaction id 529107 2023-10-24 17:31:06 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool 2023-10-24 17:31:06 0 [Note] Plugin 'FEEDBACK' is disabled. 2023-10-24 17:31:06 0 [Note] Server socket created on IP: '::'.
不必要かもしれませんが、エラー内容の前後も一緒に張り付けてあります。
[ERROR]部分の、page number=303、page number=304、page number=305がどこを示しているかは正直分からないです。
show engine innodb status で確認したところ、lsnの数値はこのようになっております。
--- LOG --- Log sequence number 109758291 Log flushed up to 109758291 Pages flushed up to 109758291 Last checkpoint at 109758282
正直、Current system log sequence number と Last checkpoint at の数値が一致するくらいで、それ以外でこれが正常かどうかはよく分かりませんでした。
試してみたこととしては、下記ページで紹介されていた「データをインサートしまくってLSNの値を進める」という方法です。下記ページの「うまく行った方法」という箇所に記されています。
log sequence number is in the future
これをxamppの再インストール直後に実施しましたが、たぶんうまく行っていないと思います。この成功例としてはおそらく Log sequence number と Last checkpoint at の数値を大きく乖離させることが狙いなのかと思われますが、その差は特に変化がありませんでした。因みに、この方法が一時的な手段であることは何となく理解しております。
また、xamppを再インストールした際にはwordpressとその他開発に必要なデータベースだけをいれて、標準のフォルダやファイル群はibdata1だけ入れるようにしました。しかしそれ以後も「log sequence number is in the future」のエラーは存在します。
私が使用するローカル環境は以下になります。
windows10 XAMPP for Windows 8.1.12 mysql Ver 15.1 Distrib 10.4.27-MariaDB, for Win64 (AMD64) VScode 1.83.1 ※xamppで開発中のcmsやフレームワーク wordpress 5.9.8(マルチサイト) Laravel Framework 9.52.15
知識としては素人同然ですので、できるだけ分かり易く教えていただけたら幸いです。
何卒よろしくお願いします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。