Symptoms
-
MySQL/MariaDB service fails to start.
-
The following error messages appear in the logs
/var/log/mysql/error.log
or/var/log/mariadb/mariadb.log
:InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 536870912 bytes!
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10.2.2. Please follow the instructions at https://mariadb.com/kb/en/library/upgrading/
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
[Note] InnoDB: Starting shutdown...
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting -
Errors like below may be shown when running the MySQL/MariaDB check:
# mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow ` -A
...
wordpress_terms
Error : Unknown table engine 'InnoDB'
error : Corrupt
wordpress_usermeta
Error : Unknown table engine 'InnoDB'
error : Corrupt
wordpress_users
Error : Unknown table engine 'InnoDB'
error : Corrupt -
Plesk is not accessible with the following error in a browser:
ERROR: Zend_Db_Statement_Exception: SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB' (Pdo.php:234)
Cause
The InnoDB files ib_logfile0
and ib_logfile1
are corrupted.
Resolution
-
Connect to a Plesk server via SSH.
-
Stop MySQL/MariaDB server:
# systemctl stop mysql || systemctl stop mariadb || systemctl stop mysqld
-
Rename the corrupted ib_logfile files:
# mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak
# mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak -
Start MySQL/MariaDB server:
# systemctl start mysql || systemctl start mariadb || systemctl start mysqld