• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Failed to start MariaDB database server.

pattolentno

New Pleskian
Server operating system version
i'm not sure
Plesk version and microupdate number
i don't know
I am trying to restart mysql thru "systemctl restart mysql" but i am getting this:
"Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details."

then when i try to see systemctl status mariadb.service, i get this:

● 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
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Fri 2023-11-24 09:14:06 HKT; 6s ago
Process: 12893 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 12878 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 12876 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 12893 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Nov 24 09:14:04 Autodeal-test mysqld[12893]: 2023-11-24 9:14:04 140553256724608 [Note] InnoDB: Waiting for purge to start
Nov 24 09:14:04 Autodeal-test mysqld[12893]: 2023-11-24 9:14:04 140553256724608 [Note] InnoDB: Percona XtraDB (Open Source Database Software Support & Services | Percona) 5.6.32-78.1 started; log sequence num...116277096297
Nov 24 09:14:04 Autodeal-test mysqld[12893]: 2023-11-24 9:14:04 140553256724608 [Note] Plugin 'FEEDBACK' is disabled.
Nov 24 09:14:04 Autodeal-test mysqld[12893]: 2023-11-24 9:14:04 140553256724608 [Note] Recovering after a crash using tc.log
Nov 24 09:14:04 Autodeal-test mysqld[12893]: 2023-11-24 9:14:04 140553256724608 [ERROR] Can't init tc log
Nov 24 09:14:04 Autodeal-test mysqld[12893]: 2023-11-24 9:14:04 140553256724608 [ERROR] Aborting
Nov 24 09:14:06 Autodeal-test systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Nov 24 09:14:06 Autodeal-test systemd[1]: Failed to start MariaDB database server.
Nov 24 09:14:06 Autodeal-test systemd[1]: Unit mariadb.service entered failed state.
Nov 24 09:14:06 Autodeal-test systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.


how to fix this?
 
The issue is probably caused by a corrupted log file tc.log in the MariaDB/MySQL data directory. If you have an exact binary backup of that file you can try to replace it from that backup. If you do not have a backup, you can still restore operations of the database server, but it is possible that some data from a previous crash cannot be recovered. To try that solution, move the file out of the path, e.g. mv /var/lib/mysql/tc.log /root/, then try to start MariaDB again.
 
Back
Top