[Solved] Error! MariaDB is not running on your system - database list could not be retrieved

I highly recommend to ask this question on MariaDB support forum

I guess there you will have more knowledgeable people that could help with your issue.

I don’t have time for that unfortunately :frowning:
I’ll be waiting there for a very long time :sob: :sob: :sob:

Do you still have the compete old mysql database directory? It isn’t possible to simply copy one of those sub directories inside, meta data is stored in other files in the parent directory. Also likely you’d simply copy the same corrupted files back. There is no way around repairing them.

With the old full database directory in place, do the following:

echo -e '[mysqld]\ninnodb_force_recovery=1' > /etc/mysql/mariadb.conf.d/99-recovery.cnf
systemctl restart mariadb

If the startup still fails, repeat the above with a value of 2, then in case 3. If with 3 it doesn’t work, it os possible to further increment it up to 6, but with the risk of permanent data loss.

Once the service started up successfully, try to do a database dump.

Generally I recommend to do a daily database dump as backup, e.g. via daily cron job.

1 Like

Oh shit) It worked!) Thanks bro!
Started backup and created a dump of all databases. :wink:

That’s basically what I told above already, to set the innodb_force_recovery option. Keep in mind to remove the parameter once you finished to export your database. This parameter should be used in emergency cases only. It is not meant for day to day operation. Purpose is to allow to startup a database in critical situation.

1 Like

i asked you for commands, you told me to go to forum mariadb((
but thanks anyway :pray:

Also, a good idea is to do a mysqlcheck -r --all-databases until all tables are okay. A mysqlcheck -o --all-databases woukd be also good to optimize or (in case of InnoDB) recreate all tables, so it’s assured that all is fine.

However, a mysqldump + reimport should have the same effect.

A post was split to a new topic: Error! MariaDB is not running