"[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed"
The error usually points to a misconfiguration or corruption in MySQL’s InnoDB engine setup.
This guide will walk you through the most effective solutions to resolve it.
You may see error logs like:
[ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. [ERROR] /usr/sbin/mysqld: unknown variable 'local-inline=0' [ERROR] Aborting
Solution 1: Remove Invalid Configuration
This specific error line: [ERROR] /usr/sbin/mysqld: unknown variable 'local-inline=0' indicates that the MySQL config file contains an unsupported directive.
To fix this, open the configuration file:
# nano /etc/my.cnf
Locate and remove the line:
# local-inline=0
Save the file and exit.
Restart MySQL service:
# sudo systemctl restart mysql
Solution 2: Reset InnoDB Log Files
Corrupted InnoDB log files can also trigger this error.
SSH into your server as root. Navigate to the MySQL data directory:
# cd /var/lib/mysql
Check for InnoDB log files:
# ls ib_logfile*
If you see log files like ib_logfile0 and ib_logfile1, rename or move them to some other folder.
Restart MySQL service:
# sudo systemctl restart mysql
New ib_logfile files will be regenerated automatically upon successful start.
Conclusion:
The "Plugin 'InnoDB' registration as a STORAGE ENGINE failed" error is typically caused by either:
- An invalid directive in my.cnf, or
- Corrupted InnoDB log files in the data directory.
By removing unsupported config lines and resetting the log files, you can usually get MySQL running again in no time.
