--innodb-force-recovery
This page is part of MariaDB's Documentation.
The parent of this page is: mariadbd & mysqld for MariaDB Enterprise Server
Topics on this page:
Overview
This is a command-line option for the mariadbd
& mysqld
commands (arg: Required).
In 11.4 ES, 10.6 ES, 10.6 CS, 10.5 ES, 10.5 CS:
Helps to save your data in case the disk image of the database becomes corrupt. Value 5 can return bogus data, and 6 can permanently corrupt data.
In 10.4 ES, 10.4 CS, 10.3 ES, 10.3 CS, 10.2 ES, 10.2 CS:
Helps to save your data in case the disk image of the database becomes corrupt.
See also: mariadbd & mysqld for MariaDB Enterprise Server 11.4, in 10.6 ES, in 10.5 ES, in 10.4 ES, in 10.3 ES, in 10.2 ES, in 10.6 CS, in 10.5 CS, in 10.4 CS, in 10.3 CS, and in 10.2 CS
DETAILS
The default value of 0
means that InnoDB is running normally. The other values are for modes that are used for recovery purposes only and no data can be changed while a mode other than 0
is active.
The recovery mode behavior depends on the MariaDB server version, see the tables below for details.
Regardless of the version of the MariaDB server, the values 5
and 6
can lead to data corruption and should be used very carefully and only if you have a database backup.
Mode | Description |
---|---|
| The default mode while InnoDB is running normally.
|
| Allows the server to keep running even if corrupt pages are detected. It does so by making redo log based recovery ignore certain errors, such as missing data files or corrupted data pages. Any redo log for affected files or pages will be skipped. You can facilitate dumping tables by getting the |
| Stops the master thread from running, preventing a crash that occurs during a purge. No purge will be performed, so the undo logs will keep growing ( |
| Does not roll back transactions after the crash recovery. Does not affect rollback of currently active transactions, also prevents some undo-generating background tasks from running. These tasks could hit a lock wait due to the recovered incomplete transactions whose rollback is being prevented ( |
| Does not calculate tables statistics and prevents insert buffer merges (
|
| Treats incomplete transactions as committed, and does not look at the undo logs when starting (
|
| Does not perform redo log roll-forward as part of recovery. Running queries that require indexes are likely to fail with this mode active. However, if a table dump still causes a crash, you can try using a |
CHANGE HISTORY
Release Series | History |
---|---|
11.4 Enterprise |
|
10.6 Enterprise |
|
10.6 Community |
|
10.5 Enterprise |
|
10.5 Community |
|
10.4 Enterprise |
|
10.4 Community |
|
10.3 Enterprise |
|
10.3 Community |
|
10.2 Enterprise |
|
10.2 Community |
|