MariaDB service is down - dbdir moved by update?

On my nextcloudpi, MariaDB is down. Must have been from an update. Issue seems unconnected to MariaDB Issue At Boot in Pi Zero · Issue #467 · nextcloud/nextcloudpi · GitHub

System Info

‣ You should enable dnsmasq to use your domain inside home

‣ You should enable automount to use your plugged in USB drive

NextCloudPi version v1.3.0
NextCloudPi image NextCloudPi_11-22-18
distribution Raspbian GNU/Linux 9 \n \l
automount no
USB devices sda
datadir /media/USBdrive/ncdata
data in SD no
data filesystem btrfs
data disk usage 5.7G/4.6T
rootfs usage 1.9G/6.7G
swapfile none
dbdir /var/lib/mysql
Nextcloud check error
HTTPD service up
PHP service up
MariaDB service down
Redis service up
Postfix service up
internet check ok
port check 80 open
port check 443 open
IP 192.168.178.24
gateway 192.168.178.1
interface eth0
certificates ***
NAT loopback no
uptime 0min

Strangely both dnsmasq and automount is checked and green (also the USB device is mounted and readable).
Problem could be that it thinks the db is on the sdcard (/var/lib/mysq). I moved it to usb disk before. How to change this?

I think mariaDB is constantly starting but failing. systemctl status gives different messages.

pi@nextcloudpi:~ $ systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.37 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2019-01-13 18:19:27 GMT; 4s ago
Docs: man:mysqld(8)
systemd - MariaDB Knowledge Base
Process: 4834 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 4745 ExecStartPre=/bin/sleep 20 (code=exited, status=0/SUCCESS)
Process: 4594 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: 4590 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 4587 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 4834 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”
CGroup: /system.slice/mariadb.service

Jan 13 18:19:27 nextcloudpi systemd[1]: mariadb.service: Unit entered failed state.
Jan 13 18:19:27 nextcloudpi systemd[1]: mariadb.service: Failed with result ‘exit-code’.
pi@nextcloudpi:~ $ systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.37 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: activating (start-pre) since Sun 2019-01-13 18:19:32 GMT; 5s ago
Docs: man:mysqld(8)
systemd - MariaDB Knowledge Base
Process: 4834 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 4901 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: 4898 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 4895 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 4834 (code=exited, status=1/FAILURE); Control PID: 5054 (sleep)
CGroup: /system.slice/mariadb.service
└─control
└─5054 /bin/sleep 20

Jan 13 18:19:32 nextcloudpi systemd[1]: Starting MariaDB 10.1.37 database server…

Thx in advance.

If you moved your db, “dbdir” should point to the new location, /var/lib/mysql being the default path. nc-database would do this normally,

Please copy/paste output of ncp.log and ncp-report via pastbin or similar.

You can edit config in cli (terminal/ssh) with:

sudo nano /var/www/nextcloud/config/config.php

Hi OliverV,

what is ncp.log? Do you mean ncdata/nextcloud.log? nextcloud.log KUGA2 - Pastebin.com
Here is ncp-report: ncp-report KUGA2 - Pastebin.com

Also i cannot find the dbdir in config.php: <?php$CONFIG = array ( 'passwordsalt' => '***', 'secret' => '***', 't - Pastebin.com

Can i change it via web interface? I am worried it will be wiped.

Please tell me instantly if i posted any compromising data!

Thanks!