Page 1 of 1

MariaDB won't start

Posted: Sat Jul 20, 2019 3:25 pm
by locutusweb
Hi,

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

Code: Select all

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'.

Code: Select all

/var/log/mysql/error.log
is empty...

Is it related to this topic? viewtopic.php?f=11&t=6115 (I don't have next cloud installed)

What could be the problem?

Re: MariaDB won't start

Posted: Sat Jul 20, 2019 8:21 pm
by johnvick
What's the location of your /dietpi/userdata folder?

Re: MariaDB won't start

Posted: Sun Jul 21, 2019 7:39 pm
by locutusweb
I used Dietpi's Drive Manager to move to a USB SSD. Could this be the problem and how to fix this?

Re: MariaDB won't start

Posted: Mon Jul 22, 2019 7:49 am
by johnvick
Probably not but have a look at this anyway:

https://dietpi.com/phpbb/viewtopic.php?f=11&t=5811&p=17695&hilit=mariadb#p17695

Are there any clues in the log?

Re: MariaDB won't start

Posted: Mon Jul 22, 2019 2:18 pm
by locutusweb
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-m ... gain/28697 also it didn't want to start...

Re: MariaDB won't start

Posted: Mon Jul 22, 2019 8:08 pm
by johnvick
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

Re: MariaDB won't start

Posted: Tue Jul 23, 2019 7:54 am
by locutusweb
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...

Re: MariaDB won't start

Posted: Tue Jul 23, 2019 10:29 am
by johnvick
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.

Re: MariaDB won't start

Posted: Tue Jul 23, 2019 4:56 pm
by locutusweb
locutusweb wrote:
Sun Jul 21, 2019 7:39 pm
I used Dietpi's Drive Manager to move to a USB SSD. Could this be the problem and how to fix this?
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