0

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.

I want to use mysql on arch so, i installed using pacman by running "sudo pacman -S mysql" and then selecting "1. mariadb" for installation. I checked mysql version : mysql Ver 15.1 Distrib 10.9.4-MariaDB, for Linux (x86_64) using readline 5.1

Then i want to start the service so i run : sudo systemctl start mariadb.service The error appears : "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."

I run the given commands so i get the following

For "sudo systemctl status mariadb.service"

× mariadb.service - MariaDB 10.9.4 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2023-02-01 20:43:54 PKT; 13min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 3250 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 3251 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, stat>
    Process: 3278 ExecStart=/usr/bin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
   Main PID: 3278 (code=exited, status=1/FAILURE)
     Status: "MariaDB server is down"
        CPU: 241ms

Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] InnoDB: Starting shutdown...
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Plugin 'InnoDB' init function returned error.
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Aborting
Feb 01 20:43:54 zain-hpelitebook840g5 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 01 20:43:54 zain-hpelitebook840g5 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Feb 01 20:43:54 zain-hpelitebook840g5 systemd[1]: Failed to start MariaDB 10.9.4 database server.

For : journalctl -xeu mariadb.service

Feb 01 20:38:54 zain-hpelitebook840g5 systemd[1]: Failed to start MariaDB 10.9.4 database server.
░░ Subject: A start job for unit mariadb.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit mariadb.service has finished with a failure.
░░
░░ The job identifier is 1576 and the job result is failed.
Feb 01 20:43:54 zain-hpelitebook840g5 systemd[1]: Starting MariaDB 10.9.4 database server...
░░ Subject: A start job for unit mariadb.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit mariadb.service has begun execution.
░░
░░ The job identifier is 1739.
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] /usr/bin/mariadbd (server 10.9.4-MariaDB) starting as process 3278 ...
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] InnoDB: Number of transaction pools: 1
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] InnoDB: Using liburing
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] InnoDB: Completed initialization of buffer pool
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] InnoDB: Invalid flags 0x4800 in ./ibdata1
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [Note] InnoDB: Starting shutdown...
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Plugin 'InnoDB' init function returned error.
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Feb 01 20:43:54 zain-hpelitebook840g5 mariadbd[3278]: 2023-02-01 20:43:54 0 [ERROR] Aborting
Feb 01 20:43:54 zain-hpelitebook840g5 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit mariadb.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Feb 01 20:43:54 zain-hpelitebook840g5 systemd[1]: mariadb.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Feb 01 20:43:54 zain-hpelitebook840g5 systemd[1]: Failed to start MariaDB 10.9.4 database server.
░░ Subject: A start job for unit mariadb.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit mariadb.service has finished with a failure.
░░
░░ The job identifier is 1739 and the job result is failed.

I tried whatever i'm able to do but cannot solve this error.

Shadow
  • 33,525
  • 10
  • 51
  • 64
  • see the comment to https://stackoverflow.com/questions/47075429/error-setting-up-mysql-table-mysql-plugin-doesnt-exist – ysth Feb 01 '23 at 16:10
  • Does this answer your question? [ERROR: InnoDB: Invalid flags 0x4800 in ./ibdata1 when installing MariaDB on macOS Ventura via Homebrew](https://stackoverflow.com/questions/74305462/error-innodb-invalid-flags-0x4800-in-ibdata1-when-installing-mariadb-on-maco) – danblack Feb 01 '23 at 21:12
  • No... the above question doesn't help... on running mysqld i get the following output $ mysqld --root 2023-02-03 7:58:47 0 [Note] mysqld (server 10.9.4-MariaDB) starting as process 22960 ... 2023-02-03 7:58:47 0 [Warning] Can't create test file /var/lib/mysql/zain-hpelitebook840g5.lower-test mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 "Permission denied") 2023-02-03 7:58:47 0 [ERROR] Aborting – Zain Razzaq Feb 03 '23 at 03:00
  • However the second one defiantly should. You've got the same Invalid flags error which means MySQL-8.0 was there. You can't start MariaDB on top of MySQL-8.0's data. – danblack Feb 03 '23 at 04:43

0 Answers0