MariaDB won't start

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
locutusweb
Posts: 24
Joined: Sun Jan 17, 2016 3:02 pm

MariaDB won't start

Post by locutusweb » Sat Jul 20, 2019 3:25 pm

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?

User avatar
johnvick
Legend
Posts: 662
Joined: Wed Jun 08, 2016 10:53 am
Location: New Zealand

Re: MariaDB won't start

Post by johnvick » Sat Jul 20, 2019 8:21 pm

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

locutusweb
Posts: 24
Joined: Sun Jan 17, 2016 3:02 pm

Re: MariaDB won't start

Post by locutusweb » 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?

User avatar
johnvick
Legend
Posts: 662
Joined: Wed Jun 08, 2016 10:53 am
Location: New Zealand

Re: MariaDB won't start

Post by johnvick » Mon Jul 22, 2019 7:49 am

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?

locutusweb
Posts: 24
Joined: Sun Jan 17, 2016 3:02 pm

Re: MariaDB won't start

Post by locutusweb » Mon Jul 22, 2019 2:18 pm

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

User avatar
johnvick
Legend
Posts: 662
Joined: Wed Jun 08, 2016 10:53 am
Location: New Zealand

Re: MariaDB won't start

Post by johnvick » Mon Jul 22, 2019 8:08 pm

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

locutusweb
Posts: 24
Joined: Sun Jan 17, 2016 3:02 pm

Re: MariaDB won't start

Post by locutusweb » Tue Jul 23, 2019 7:54 am

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

User avatar
johnvick
Legend
Posts: 662
Joined: Wed Jun 08, 2016 10:53 am
Location: New Zealand

Re: MariaDB won't start

Post by johnvick » Tue Jul 23, 2019 10:29 am

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.

locutusweb
Posts: 24
Joined: Sun Jan 17, 2016 3:02 pm

Re: MariaDB won't start

Post by locutusweb » Tue Jul 23, 2019 4:56 pm

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

Post Reply