Some times MySQL fails to start/restart with an error like “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”
The simple solution to fix is to delete InnoDB log files “ ib_logfile0” and “ ib_logfile1 “.
Steps to delete above mentioned files
- The files “ib_logfile0” and “ib_logfile1” usually reside in the data directory in Mysql installed directory so delete those files with the following commands.
sudo rm /usr/local/mysql/data/ib_logfile0 /usr/local/mysql/data/ib_logfile1
- Then start/restart the MySQL service again and it should start working.
sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server restart
Note: Mysql Directory path
The above paths mentioned may vary on different systems but the below paths are general installation paths on most of the systems:
- For Window:
[drive]:\ProgramData\MySQL\MySQL Server 5.5\data
C:\ProgramData\MySQL\MySQL Server 5.5\data\ib_logfile1
- For mac:
I hope it helps you resolve your problem.