MariaDB service won't start

I had an unexpected power loss and now the MariaDB service won’t start. Does MariaDB use lock files like MySQL does?

What platform are you on? unexpected power loss is generally well handled by both Mysql and MariaDB. How are you handling your MariaDB service ? SysV or systemd ?

Systemd The service is failing to start at startup too, hence why I tried to start it manually using “systemctl start mariadb”

and what is the issue of

systemctl status maraiadb

before you try to start it ?

it shows status “failed”. I was looking in /var/log/mariadb.mariadb.log but didnt see anything that really stood out

You didn’t say what OS, did you attempt to repair the databases ? systemctl status mariadb does not just say ‘failed’ it includes a contextual “why it failed”

I am unable to do so since the service won’t start, there is no way to connected to the database for check/repair. Also i’m running the latest FreePBX Distro.

You don’t need to connect to the running database to repair it, you just need mysqlcheck to have access to the raw database file(s) in /var/lib/mysql/ * if it can’t fix it then you are probably hosed and should restore the database from your latest good backup.

well I just ran “mysqlcheck -A --auto-repair” as root and it returned “mysqlcheck: Got error: 2002: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111) when trying to connect”

Then maybe your ARE hosed, restore from your last good backup .

In the future if you enable full journalling , you would have a better chance of repairing serious damage

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.