My MariaDB is not starting up. On manually trying to start, the error message is:
Job for mariadb.service failed because a timeout was exceeded. See “systemctl status mariadb.service” and “journalctl -xe” for details.
The mariadb log file just shows these two lines on every attempt to start service or reboot server:
220729 05:07:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
220729 05:07:26 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Is there any way to recover my databases so if I have to reinstall my VPS I should be able to restore the databases at least.
Super frustrating that this happend. Do you have any idea what happend before the database server broke down? Did you install updates? was there an outage at the provider? any info like that helps in determining where too look faster.
In the meantime, could you login on the console of this server ( SSH ) and provide the output you get from the two commands below. This will help us determine why the server is not starting.
Is there a good guide you could point to for how you did this?
I ran into this same issue a couple days ago. I’ve been able to restore everything other than MySQL on a new VPS and hoping I can follow your lead to getting back from there.
I installed XAMPP portable on my windows machine.
From /var/lib/mysql/data from my VPS I copied the folder that had same name as my database and all the files (ibdata and iblog) into the corresponding /data folder in xampp on my windows machine.
Then ran phpmyadmin on xampp and exported the database as a .sql file. PHPmyadmin had errors in some of it’s preinstalled databases but did not interfere in accessing the database that I needed.
I’m not sure if I’m digging in the wrong spot or pulling the wrong information. I went to the downed VPS and pulled everything in /var/lib/mysql but it didn’t have a data folder in it. It did have folders for each individual database I had though. I was able to find the ibdata1, ib_logfile0 and ib_logfile1 in the downed VPS /var/lib/mysql folder though.
I copied the ibdata and ib_logfiles into xampp/mysql/ data and then dropped the database folders in that same folder. When I try to run that though it fails every time. If I check the logs in xampp I get:
2022-08-02 11:52:58 0 [ERROR] InnoDB: Invalid flags 0x4800 in C:\xampp\mysql\data\ibdata1
2022-08-02 11:52:58 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2022-08-02 11:52:58 0 [Note] InnoDB: Starting shutdown...
2022-08-02 11:52:59 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-08-02 11:52:59 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-08-02 11:52:59 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-08-02 11:52:59 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-08-02 11:52:59 0 [ERROR] Aborting