Press "Enter" to skip to content

[ERROR] InnoDB: Cannot find the dir slot for this record on that page



innodb_force_recovery = 1

官方文档写的很清楚,默认这个值是0,不会强制恢复。你可以改成 1-6中的数值,开启强制恢复。



  • 1 (SRV_FORCE_IGNORE_CORRUPT)Lets the server run even if it detects a corrupt page. Tries to make SELECT * FROM tbl_name jump over corrupt index records and pages, which helps in dumping tables.
  • 2 (SRV_FORCE_NO_BACKGROUND)Prevents the master thread and any purge threads from running. If an unexpected exit would occur during the purge operation, this recovery value prevents it.
  • 3 (SRV_FORCE_NO_TRX_UNDO)Does not run transaction rollbacks after crash recovery.
  • 4 (SRV_FORCE_NO_IBUF_MERGE)Prevents insert buffer merge operations. If they would cause a crash, does not do them. Does not calculate table statistics. This value can permanently corrupt data files. After using this value, be prepared to drop and recreate all secondary indexes. Sets InnoDB to read-only.
  • 5 (SRV_FORCE_NO_UNDO_LOG_SCAN)Does not look at undo logs when starting the database: InnoDB treats even incomplete transactions as committed. This value can permanently corrupt data files. Sets InnoDB to read-only.
  • 6 (SRV_FORCE_NO_LOG_REDO)Does not do the redo log roll-forward in connection with recovery. This value can permanently corrupt data files. Leaves database pages in an obsolete state, which in turn may introduce more corruption into B-trees and other database structures. Sets InnoDB to read-only.

您的电子邮箱地址不会被公开。 必填项已用 * 标注