Applicable to:
- Plesk for Linux
Symptoms
-
MySQL/MariaDB service fails to start.
-
The following error messages appear in the logs
/var/log/mysql/error.logor/var/log/mariadb/mariadb.log:CONFIG_TEXT: 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.
CONFIG_TEXT: [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:
PLESK_ERROR: 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
Comments
(re)moving redo log files is incorrect. They will still contain crash recovery information and given that it has crashed those need to be processed. They need to be processed with the previous version of MariaDB. This can be done with a downgrade, or with MariaDB stopped, a "docker run -v /var/lib/mysql:/var/lib/mysql mariadb:{old version number]. This will complete the crash recovery. To cleanly shutdown the container docker exec {containername} kill 1 to deliver a SIGTERM and allow to terminate.
Please sign in to leave a comment.