Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Databases and Redis

MariaDB will not start: Plugin 'InnoDB' registration as a STORAGE ENGINE failed

Error[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

Short answer

This line is a symptom, not the cause: InnoDB failed to start and the server gave up. The real reason is a few lines earlier in the error log. Two documented ones are a missing or invalid ib_logfile0 (MariaDB 10.8.1 and later) and a data directory that needs InnoDB forced recovery after a crash.

  • Applies to MariaDB 10.11, MariaDB 11.4, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Read the first InnoDB error in the log, not the registration line. It sits above it and names the cause.

    sudo journalctl -u mariadb --no-pager -n 80
  2. 2Match what you see, then jump to its fix

    1. 1An InnoDB line about ib_logfile0 (missing, invalid or 'too small') comes before the registration error.The redo log file ib_logfile0 was deleted, damaged or is too smallFix
    2. 2The log shows corruption or recovery failures right before the registration error.The data directory is damaged after a crash and InnoDB cannot recover normallyFix

What does the error look like?

  • [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  • [ERROR] InnoDB: File ./ib_logfile0 is too small
  • [ERROR] Unknown/unsupported storage engine: InnoDB

Cause 1 of 2

The redo log file ib_logfile0 was deleted, damaged or is too small

1Check

From MariaDB 10.8.1 InnoDB needs ib_logfile0 to exist and be valid to start; the server refuses to start when it is missing. A file below the minimum size is rejected with 'File ./ib_logfile0 is too small'. Old advice to delete the redo log files to resize them no longer works.

sudo ls -l /var/lib/mysql/ib_logfile0

2Fix

Do not delete it again. Stop the server, and put back the original ib_logfile0 from a copy of the data directory made before it was removed. Resize the log later with innodb_log_file_size on a running server (dynamic from MariaDB 10.9), not by removing the file.

sudo systemctl stop mariadb
sudo cp -a /backup/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0
sudo chown mysql:mysql /var/lib/mysql/ib_logfile0
sudo systemctl start mariadb

3Verify

The service starts and the log has no InnoDB errors.

sudo systemctl status mariadb --no-pager

Confirmed by mariadb.com

Did this fix it?

Cause 2 of 2

The data directory is damaged after a crash and InnoDB cannot recover normally

1Check

MariaDB's recovery-modes page defines innodb_force_recovery levels 1 to 6. It says to try 1, and if the server still fails, 2, and so on.

sudo grep -i innodb /var/log/mysql/error.log | tail -n 30

2Fix

Copy the data directory first. Add innodb_force_recovery=1 under [mariadbd], start the server, and raise the value one step at a time only if it still fails. Once it runs, dump everything with mariadb-dump, then rebuild from the dump as the page describes.

# /etc/mysql/mariadb.conf.d/99-recovery.cnf
[mariadbd]
innodb_force_recovery = 1

mariadb-dump --all-databases > /root/all-databases.sql

3Verify

The dump file is created and the server answers queries while recovery mode is on.

ls -lh /root/all-databases.sql

Confirmed by mariadb.com

Did this fix it?

How do I stop it coming back?

  • Never delete ib_logfile0 or other InnoDB files by hand; change innodb_log_file_size through the server.
  • Take a copy of the data directory before any recovery step.
  • Keep recovery mode temporary: dump, remove the setting, and restore from the dump.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.