How to Fix Error InnoDB Registration as a Storage Engine Failed?

You may encounter the server-side error - “Plugin 'InnoDB' registration as a STORAGE ENGINE failed: MySQL cannot load the InnoDB engine” while connecting to MySQL Server. It often occurs when the InnoDB storage engine fails to load the InnoDB system files. You can check this error in your MySQL error logs. When this error occurs, MySQL Server fails to start or sometimes your Workbench will partially open, and you may fail to execute any queries. It makes all the InnoDB tables inaccessible. If you fail to resolve this error, it can lead to risk of integrity issues.

How to Fix Error InnoDB Registration
In this article, we will learn efficient methods to resolve the MySQL error “InnoDB registration as a STORAGE ENGINE failed.” If the server fails to start, you may need to use InnoDB force recovery but it involves risk of data loss. you can use Stellar’s online MySQL database repair service to fix your database directly via a web browser. This service allows you to repair a database of up to 500 MB in size for free, without needing to install MySQL Server.

Causes of MySQL Error InnoDB Registration as a STORAGE ENGINE Failed

MySQL server may fail to load the InnoDB storage engine due to the following reasons:
 *  Server has run out of free disk space
 *  Corrupt log files
 *  Incorrect configuration files
 *  Corruption in ibdata and .ibd files

Methods to Resolve Error InnoDB Registration as a STORAGE ENGINE Failed

As we have already discussed, there are multiple reasons for this error. So, you can check the MySQL error log to find the exact cause. To check this, follow the below path (if Workbench won’t open):
C:\ProgramData\MySQL\MySQL Server X.Y\data\hostname.err
Here, in our case, host name is IB-L211.

Double-click on the ERR file to view the error logs.
error logs
If you’re able to open Workbench and fail to connect to the MySQL service, you can open the error logs via Workbench. Click Help and then select Show Log File.
Show Log File
Once you’ve confirmed the cause, then follow the following troubleshooting methods.

Method 1 - Check and Free Up Disk Space

You can even get the “InnoDB registration as a STORAGE ENGINE failed” error when MySQL Server has run out of space. In this case, first determine which disk is full. MySQL database can be stored on a different hard disk. So, follow the path link stated in the error logs. Check and ensure that enough storage space is available on the drive where MySQL tables are located. Right click the drive where the tables are stored and select Properties. If disk space is low, free up some space by deleting old or unwanted files. You can also delete temporary files using the Disk Cleanup tool. For this, open Disk Cleanup, select the drive to clean, and click OK.
Sometimes, purging binary log files can help to free up some disk space. To delete binary logs file using a PURGE BINARY LOGS Statement, you need a running MySQL service. So, you can manually delete the binary log files using the following steps:
Note: Manually deleting the binary logs is not recommended as this can cause loss of data or replication issues.
 *  Go to MySQL data directory by following this path:
C:\ProgramData\MySQL\MySQL Server X.Y\data
 *  In the Data folder, search for binary files that appear like LB_L211-bin.000074, LB_L211-bin.00073, and delete the older ones.
 *  Next, update the Index file by deleting the same binary files as the Index file contains deleted binary logs.
binary logs
Once done, then try to connect to the MySQL service.

Method 2 - Check and Fix Configuration Settings

You can resolve the MySQL error “InnoDB registration as a STORAGE ENGINE failed” by removing invalid configuration settings. To do so, open the my.ini file (locates at C:\Program Files\MySQL\MySQL Server X.Y\) and then check and fix the following settings:
innodb_data_home_dir="C:/xampp/mysql/data"
innodb_data_file_path=ibdata1:10M:autoextend
innodb_log_group_home_dir="C:/xampp/mysql/data"
innodb_log_file_size=5M
innodb_buffer_pool_size=16M


Configuration Settings

Method 3 - Reset InnoDB Log Files

The InnoDB storage engine usually fails to load if the InnoDB log files are damaged or corrupted. You can reset these files. To do so, follow the steps given below:
 *  In your SQL configuration file, look for InnoDB log files such as ib_logfile0 and ib_logfile1, rename or move them to some other folder.
 *  Now restart the MySQL Server. It will recreate the log file and resolve the error if the storage engine fails due to missing or damaged log files.

Method 4 - Start MySQL Server by Force Recovery

The individual table space (.idb) and system table-space (ibdata1) files are important to start InnoDB storage engine. If any of these files get damaged, you may fail to start MySQL and receive the error InnoDB registration as a STORAGE ENGINE failed. In such a case, you need to use innodb_force_recovery to start MySQL. This helps you access the tables and then repair them using the dump and reload method.
You may need to set the value of the innodb_force_recovery option to a higher value (up to 6), especially in case of severely corrupted InnoDB tables. However, values of 4 or above can lead to permanent data loss.

What to do if MySQL InnoDB Tables are Severely Corrupted?

Sometimes, the innodb_force_recovery option fails to start MySQL Server due to severe corruption in InnoDB tables. In such a case, you can use a professional MySQL repair tool, like Stellar Repair for MySQL. It allows you to repair multiple corrupt InnoDB tables at once or the entire database of any size or in any state. It can recover all the objects, including tables, foreign keys, and primary keys, with complete integrity. Also, it supports selective recovery and is compatible with both Windows and Linux operating systems.

Conclusion

You can face the MySQL startup error- Plugin 'InnoDB' registration as a STORAGE ENGINE failed: MySQL cannot load the InnoDB engine, due to numerous reasons. Follow the troubleshooting methods discussed above according to the cause. You can check the file size and other settings in MySQL configuration files, recreate log files, etc. to resolve the error. If corruption in database files is preventing the engine from starting/connecting, then use innodb-force-recovery. To quickly repair corrupt database files, use a reliable MySQL repair tool, such as Stellar Repair for MySQL.