ERROR! MariaDB is not running, but lock file (/var/lock/subsys/mysql) exists

Hell All ,

Please advise us how to proceed with this error.

[root@frsellaappesc12 ~]# ls /var/lock/subsys/mysql
/var/lock/subsys/mysql
[root@frsellaappesc12 ~]# /etc/init.d/mysql status
ERROR! MariaDB is not running, but lock file (/var/lock/subsys/mysql) exists
[root@frsellaappesc12 ~]# /etc/init.d/mysqld restart
-bash: /etc/init.d/mysqld: Aucun fichier ou dossier de ce type
[root@frsellaappesc12 ~]# ls -l /etc/init.d/mysqld
ls: impossible d’accéder à /etc/init.d/mysqld: Aucun fichier ou dossier de ce type
[root@frsellaappesc12 ~]# /etc/init.d/mysql start
Starting mysql (via systemctl): Job for mariadb.service failed because the control process exited with error code. See “systemctl status mariadb.service” and “journalctl -xe” for details.
[ÉCHOUÉ]

[root@frsellaappesc12 ~]# /etc/init.d/mysql status
ERROR! MariaDB is not running, but lock file (/var/lock/subsys/mysql) exists
[root@frsellaappesc12 ~]# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.32 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 jeu. 2022-03-31 07:34:11 CEST; 3min 0s ago
Docs: man:mysqld(8)
systemd - MariaDB Knowledge Base
Process: 5031 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 14353 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 14330 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, status=0/SUCCESS)
Process: 14328 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 14353 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”

mars 31 07:34:11 frsellaappesc12 mysqld[14353]: 2022-03-31 7:34:11 0 [Note] InnoDB: Starting shutdown…
mars 31 07:34:11 frsellaappesc12 mysqld[14353]: 2022-03-31 7:34:11 0 [ERROR] Plugin ‘InnoDB’ init function returned error.
mars 31 07:34:11 frsellaappesc12 mysqld[14353]: 2022-03-31 7:34:11 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
mars 31 07:34:11 frsellaappesc12 mysqld[14353]: 2022-03-31 7:34:11 0 [Note] Plugin ‘FEEDBACK’ is disabled.
mars 31 07:34:11 frsellaappesc12 mysqld[14353]: 2022-03-31 7:34:11 0 [ERROR] Unknown/unsupported storage engine: InnoDB
mars 31 07:34:11 frsellaappesc12 mysqld[14353]: 2022-03-31 7:34:11 0 [ERROR] Aborting
mars 31 07:34:11 frsellaappesc12 systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
mars 31 07:34:11 frsellaappesc12 systemd[1]: Failed to start MariaDB 10.3.32 database server.
mars 31 07:34:11 frsellaappesc12 systemd[1]: Unit mariadb.service entered failed state.
mars 31 07:34:11 frsellaappesc12 systemd[1]: mariadb.service failed.
[root@frsellaappesc12 ~]#

Regards
Prashant

1 Like

Remove the lock file manually, then start database.

1 Like

Hello i removed but database not started

1 Like

You need to provide MySQL’s error log, not the redacted logs from systemd.

1 Like