MariaDB won't start

Hi,

After updating to v6.25.3 (I think) mariaDB won’t start:

systemctl status mariadb
● mariadb.service - MariaDB 10.1.38 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-07-20 16:06:11 CEST; 3min 51s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 19595 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 19518 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: 19512 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 19511 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 19595 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

jul 20 16:06:06 DietPi systemd[1]: Starting MariaDB 10.1.38 database server...
jul 20 16:06:07 DietPi mysqld[19595]: 2019-07-20 16:06:07 1996115760 [Note] /usr/sbin/mysqld (mysqld 10.1.38-MariaDB-0+deb9u1) starting as process 19595 ...
jul 20 16:06:11 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
jul 20 16:06:11 DietPi systemd[1]: Failed to start MariaDB 10.1.38 database server.
jul 20 16:06:11 DietPi systemd[1]: mariadb.service: Unit entered failed state.
jul 20 16:06:11 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.



/var/log/mysql/error.log

is empty…

Is it related to this topic? https://dietpi.com/forum/t/nextcloud-breaks-mariadb-on-install/3329/1 (I don’t have next cloud installed)

What could be the problem?

What’s the location of your /dietpi/userdata folder?

I used Dietpi’s Drive Manager to move to a USB SSD. Could this be the problem and how to fix this?

Probably not but have a look at this anyway:

https://dietpi.com/forum/t/solved-new-install-6-22-odroid-xu4-mariadb-error/3107/4

Are there any clues in the log?

Hi,

Thanks for helping out, but your solution did not fix it.

There is nothing in /var/log/mysql/error.log, is there somewhere else a working log?

I remembered that I had also a full disk. I found this: https://help.nextcloud.com/t/100-disk-mariadb-wont-start-again/28697 also it didn’t want to start…

Sorry stumped here. I’ve had this happen numerous times for different reasons and always eventually fixed it. I take it you’ve uninstalled and reinstalled and looked in the MySql/MariaDB forums?

John

I did not uninstall/reinstall because I am afraid I lose my DB’s; I was hoping for a “easier” fix. As you have seen in my earlier posts in this topic; I did search around, but it’s hard to find the solution as I can’t find any logs of mariadb and also “systemctl status mariadb” doesn’t throw a detailed error…

You can use dietpi-backup before uninstall/reinstall.

I have uninstalled/renistalled MariaDB/MySql many times and haven’t lost my DBs but always good to have a backup.

It was just that: a stress bended usb cable to my SSD drive. Just gave it some slack and it works as a charm.

johnvick thanks for your help