MariaDB not starting

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
User avatar
johnvick
Legend
Posts: 575
Joined: Wed Jun 08, 2016 10:53 am
Location: New Zealand

MariaDB not starting

Post by johnvick » Thu Feb 14, 2019 4:11 am

This is the message - any ideas on how to fix? Uninstall/reinstall didn't help.

Feb 14 17:08:11 Z83 systemd[1]: Starting MariaDB 10.1.37 database server...
Feb 14 17:08:12 Z83 mysqld[1684]: 2019-02-14 17:08:12 140339973317056 [Note] /us
r/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 1684 ...
Feb 14 17:08:12 Z83 mysqld[1684]: 2019-02-14 17:08:12 140339973317056 [Warning]
Can't create test file /var/lib/mysql/Z83.lower-test
Feb 14 17:08:12 Z83 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 17:08:12 Z83 systemd[1]: Failed to start MariaDB 10.1.37 database server.
Feb 14 17:08:12 Z83 systemd[1]: mariadb.service: Unit entered failed state.
Feb 14 17:08:12 Z83 systemd[1]: mariadb.service: Failed with result 'exit-code'.
[email protected]:~# systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.37 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-02-14 17:08:12 NZDT; 42s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 1684 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 1607 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environmen
t _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 1603 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 1600 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 1684 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Feb 14 17:08:11 Z83 systemd[1]: Starting MariaDB 10.1.37 database server...
Feb 14 17:08:12 Z83 mysqld[1684]: 2019-02-14 17:08:12 140339973317056 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 1684 ...
Feb 14 17:08:12 Z83 mysqld[1684]: 2019-02-14 17:08:12 140339973317056 [Warning] Can't create test file /var/lib/mysql/Z83.lower-test
Feb 14 17:08:12 Z83 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 17:08:12 Z83 systemd[1]: Failed to start MariaDB 10.1.37 database server.
Feb 14 17:08:12 Z83 systemd[1]: mariadb.service: Unit entered failed state.
Feb 14 17:08:12 Z83 systemd[1]: mariadb.service: Failed with result 'exit-code'.

User avatar
MichaIng
Legend
Posts: 829
Joined: Sat Nov 18, 2017 5:21 pm

Re: MariaDB not starting

Post by MichaIng » Sat Feb 16, 2019 5:38 pm

Can't create test file /var/lib/mysql/Z83.lower-test
Perhaps a permissions issue?
chown -R mysql:mysql /var/lib/mysql

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

Re: MariaDB not starting

Post by johnvick » Sat Feb 16, 2019 6:35 pm

Thanks MichaIng but this is the result:

[email protected]:~# systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.37 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2019-02-17 07:32:39 NZDT; 12s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 1082 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 1005 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: 1000 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 997 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 1082 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Feb 17 07:32:37 Z83 systemd[1]: Starting MariaDB 10.1.37 database server...
Feb 17 07:32:39 Z83 mysqld[1082]: 2019-02-17 7:32:39 140082421084608 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 1082 ...
Feb 17 07:32:39 Z83 mysqld[1082]: 2019-02-17 7:32:39 140082421084608 [Warning] Can't create test file /var/lib/mysql/Z83.lower-test
Feb 17 07:32:39 Z83 mysqld[1082]: [90B blob data]
Feb 17 07:32:39 Z83 mysqld[1082]: 2019-02-17 7:32:39 140082421084608 [ERROR] Aborting
Feb 17 07:32:39 Z83 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 17 07:32:39 Z83 systemd[1]: Failed to start MariaDB 10.1.37 database server.
Feb 17 07:32:39 Z83 systemd[1]: mariadb.service: Unit entered failed state.
Feb 17 07:32:39 Z83 systemd[1]: mariadb.service: Failed with result 'exit-code'.

Post Reply