Cómo solucionar los errores: InnoDB Plugin initialization aborted with error Generic error, Plugin InnoDB registration as a STORAGE ENGINE failed y Unknown/unsupported storage engine InnoDB en un servidor Linux Ubuntu con base de datos MariaDB.
- Síntoma, errores al intentar iniciar el servicio mariadb en un equipo Linux Ubuntu Server.
- Posible solución al error al iniciar servicio MariaDB con InnoDB.
Síntoma, errores al intentar iniciar el servicio mariadb en un equipo Linux Ubuntu Server
Cuando intentamos iniciar el servicio de MariaDB con el comando:
1 |
systemctl start mariadb |
Nos devuelve el error:
Job for mariadb.service failed because the control process exited with error code.
See «systemctl status mariadb.service» and «journalctl -xeu mariadb.service» for details.
Si ejecutamos el siguiente comando, para obtener más datos del error:
1 |
journalctl -xeu mariadb.service |

Nos devuelve el siguiente log de errores al intentar iniciar el servicio de MariaDB:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] Starting MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1 source revision as process> dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] InnoDB: Number of pools: 1 dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217> dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] InnoDB: Completed initialization of buffer pool dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=42450,42450 dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 42450 between the checkpoint 42450 and th> dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] InnoDB: Starting shutdown... dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [ERROR] Plugin 'InnoDB' init function returned error. dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [Note] Plugin 'FEEDBACK' is disabled. dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [ERROR] Unknown/unsupported storage engine: InnoDB dic 07 10:49:50 mysql mariadbd[1912]: 2023-12-07 10:49:50 0 [ERROR] Aborting dic 07 10:49:50 mysql systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE Subject: Unit process exited Defined-By: systemd An ExecStart= process belonging to unit mariadb.service has exited. The process' exit code is 'exited' and its exit status is 1. dic 07 10:49:50 mysql systemd[1]: mariadb.service: Failed with result 'exit-code'. Subject: Unit failed Defined-By: systemd The unit mariadb.service has entered the 'failed' state with result 'exit-code'. dic 07 10:49:50 mysql systemd[1]: Failed to start MariaDB 10.6.12 database server. Subject: A start job for unit mariadb.service has failed Defined-By: systemd A start job for unit mariadb.service has finished with a failure. The job identifier is 889 and the job result is failed. |
Posible solución al error al iniciar servicio MariaDB con InnoDB
Una posible solución a este error es eliminar los ficheros de log de InnoDB. Para ello, accederemos a la carpeta donde se almacenan los ficheros de la base de datos. Para MariaDB 10.6 y Linux Ubuntu Server 22.04, suelen estar en la carpeta:
/var/lib/mysql
Accederemos a ella con:
1 |
cd /var/lib/mysql |
Y listaremos todos los ficheros con el nombre ib_logfilexxx, con:
1 |
ls -lah ib_logfile* |
Nos devolverá uno o varios ficheros:
ib_logfile0
ib_logfile1
Los eliminaremos todos, ejecutando el comando:
1 |
sudo rm ib_logfile* |
Ahora ya podremos iniciar el servicio MariaDB con:
1 |
sudo systemctl start mariadb |
Que se iniciará correctamente. Podremos comprobar el estado de inicio con:
1 |
sudo systemctl status mariadb |
Nos devolverá algo así como:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
mariadb.service - MariaDB 10.6.12 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2023-12-07 11:14:48 UTC; 9s ago Docs: man:mariadbd(8) https://mariadb.com/kb/en/library/systemd/ Process: 2226 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS) Process: 2227 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 2229 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]> Process: 2276 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 2278 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS) Main PID: 2264 (mariadbd) Status: "Taking your SQL requests now..." Tasks: 13 (limit: 9389) Memory: 60.9M CPU: 596ms CGroup: /system.slice/mariadb.service └─2264 /usr/sbin/mariadbd dic 07 11:14:48 mysql mariadbd[2264]: Version: '10.6.12-MariaDB-0ubuntu0.22.04.1' socket: '/run/mysqld/mysqld.sock' port: 3306 Ubuntu 22.04 dic 07 11:14:48 mysql systemd[1]: Started MariaDB 10.6.12 database server. dic 07 11:14:48 mysql /etc/mysql/debian-start[2280]: Upgrading MySQL tables if necessary. dic 07 11:14:48 mysql /etc/mysql/debian-start[2283]: Looking for 'mariadb' as: /usr/bin/mariadb dic 07 11:14:48 mysql /etc/mysql/debian-start[2283]: Looking for 'mariadb-check' as: /usr/bin/mariadb-check dic 07 11:14:48 mysql /etc/mysql/debian-start[2283]: This installation of MariaDB is already upgraded to 10.6.12-MariaDB. dic 07 11:14:48 mysql /etc/mysql/debian-start[2283]: There is no need to run mysql_upgrade again for 10.6.12-MariaDB. dic 07 11:14:48 mysql /etc/mysql/debian-start[2283]: You can use --force if you still want to run mysql_upgrade dic 07 11:14:48 mysql /etc/mysql/debian-start[2291]: Checking for insecure root accounts. dic 07 11:14:48 mysql /etc/mysql/debian-start[2295]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables |
Indicando que el servicio de MariaDB se ha iniciado correctamente y el error se ha solucionado.
