I have just migrated from mysql to mariadb on Ubuntu 20.04 server with apt install mariadb-server. The installation ended fine, but mariadb-server didn't start.
This is the output of the command:
service mariadb start; journalctl -xe Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details. -- Defined-By: systemd -- Support: -- -- A start job for unit mariadb.service has begun execution. -- -- The job identifier is 22456. Nov 04 13:46:18 Socrates mysqld[18047]: 2020-11-04 13:46:18 0 [Note] /usr/sbin/mysqld (mysqld 10.3.> Nov 04 13:46:18 Socrates mysqld[18047]: 2020-11-04 13:46:18 0 [Warning] Could not increase number o> Nov 04 13:46:19 Socrates audit[18047]: AVC apparmor="DENIED" operation="sendmsg" info="Failed name > Nov 04 13:46:19 Socrates kernel: audit: type=1400 audit(1604493979.310:19): apparmor="DENIED" opera> Nov 04 13:46:19 Socrates audit[18047]: AVC apparmor="DENIED" operation="sendmsg" info="Failed name > Nov 04 13:46:19 Socrates kernel: audit: type=1400 audit(1604493979.530:20): apparmor="DENIED" opera> Nov 04 13:46:19 Socrates systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FA> -- Subject: Unit process exited -- Defined-By: systemd -- Support: -- -- An ExecStart= process belonging to unit mariadb.service has exited. -- -- The process' exit code is 'exited' and its exit status is 1. Nov 04 13:46:19 Socrates systemd[1]: mariadb.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: -- -- The unit mariadb.service has entered the 'failed' state with result 'exit-code'. Nov 04 13:46:19 Socrates systemd[1]: Failed to start MariaDB 10.3.25 database server. -- Subject: A start job for unit mariadb.service has failed -- Defined-By: systemd -- Support: -- -- A start job for unit mariadb.service has finished with a failure. -- -- The job identifier is 22456 and the job result is failed. This is what I found in /var/log/mysql/error.log:
2020-11-04 14:17:50 0 [ERROR] InnoDB: Invalid flags 0x4000 in ./ibdata1 2020-11-04 14:17:50 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption 2020-11-04 14:17:50 0 [Note] InnoDB: Starting shutdown... 2020-11-04 14:17:51 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-11-04 14:17:51 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-11-04 14:17:51 0 [Note] Plugin 'FEEDBACK' is disabled. 2020-11-04 14:17:51 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded 2020-11-04 14:17:51 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-11-04 14:17:51 0 [ERROR] Aborting 1 Reset to default