After system restarted, mariadb failed to startup.

Solution Verified - Updated -

Issue

  • After system restarted, mariadb service failed to start up. But then the mariadb service can be started manually normally.

  • We can verify error messages as below:

#sudo systemctl status mariadb
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           mqoverride.conf
   Active: failed (Result: exit-code) since 木 2023-11-16 12:13:35 JST; 55min ago
  Process: 1154 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=1/FAILURE)

11月 16 12:13:35 localhost systemd[1]: Starting MariaDB database server...
11月 16 12:13:35 localhost mariadb-prepare-db-dir[1154]: Database MariaDB is not initialized, but the directory /DB/mysql-5.5.60-MariaDB ... done.
11月 16 12:13:35 localhost mariadb-prepare-db-dir[1154]: Make sure the /DB/mysql-5.5.60-MariaDB is empty before running mariadb-prepare-db-dir.
11月 16 12:13:35 localhost systemd[1]: mariadb.service: control process exited, code=exited status=1
11月 16 12:13:35 localhost systemd[1]: Failed to start MariaDB database server.
11月 16 12:13:35 localhost systemd[1]: Unit mariadb.service entered failed state.
11月 16 12:13:35 localhost systemd[1]: mariadb.service failed.

Environment

  • Red Hat Enterprise Linux
  • MariaDB

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content