1685
MariaDBERRORCommonInnoDBHIGH confidence
Cannot execute DML or DDL while innodb_force_recovery > 0
Production Risk
High — server is in a degraded recovery state; normal operations are blocked.
What this means
When innodb_force_recovery is set to a value greater than 0, InnoDB allows reads only. Any attempt to write data or modify the schema is rejected with this error.
Why it happens
- 1innodb_force_recovery is set in my.cnf for crash-recovery purposes.
- 2Administrator is attempting writes during a forced recovery session.
How to reproduce
trigger — this will error
trigger — this will error
-- my.cnf: innodb_force_recovery = 1 INSERT INTO t VALUES (1);
expected output
ERROR 1685 (HY000): Cannot execute statement because innodb_force_recovery > 0.
Fix
Export data and restore with innodb_force_recovery = 0
Export data and restore with innodb_force_recovery = 0
-- Export while in recovery mode: mysqldump --single-transaction mydb > mydb_backup.sql -- Remove innodb_force_recovery from my.cnf, restart MySQL, then restore.
Why this works
Remove the force-recovery option and import the exported dump into a clean instance.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1685 ER_INNODB_FORCED_RECOVERY
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev