MariaDB nor starting after upgrade

Usual thing. Ran an upgrade via ssh and now get a Mariadb error which seems to return a failure at ths point when doing a systemctl status mariadb.service

ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)

any clues on where to look? Its a RPI3 with open beta v7.2

Hi,

pls can you post following

systemctl restart mariadb.service
journalctl -u mariadb
cat /var/log/mysql/error.log
readlink /var/lib/mysql
readlink -f /var/lib/mysql

super quick :slight_smile:

systemctl restart mariadb.service

Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

journalctl -u mariadb

-- Logs begin at Thu 2019-02-14 10:11:58 GMT, end at Fri 2021-05-28 17:21:28 BST. --
May 28 16:21:37 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
May 28 16:21:38 DietPi mysqld[784]: 2021-05-28 16:21:38 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB
-0+deb10u1) starting as process 784 ...
May 28 16:21:38 DietPi mysqld[784]: 2021-05-28 16:21:38 0 [Warning] Could not increase number of max_open
_files to more than 16384 (request: 32186)
May 28 16:21:38 DietPi mysqld[784]: 2021-05-28 16:21:38 0 [Warning] Can't create test file /var/lib/mysql
/DietPi.lower-test
May 28 16:21:38 DietPi mysqld[784]: [97B blob data]
May 28 16:21:38 DietPi mysqld[784]: 2021-05-28 16:21:38 0 [ERROR] Aborting
May 28 16:21:38 DietPi systemd[1]: mariadb.service: Main process exited, code=exi
ted, status=1/FAILURE
May 28 16:21:38 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code
'.
May 28 16:21:38 DietPi systemd[1]: Failed to start MariaDB 10.3.27 database serve
r.
May 28 17:20:30 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
May 28 17:20:30 DietPi mysqld[4695]: 2021-05-28 17:20:30 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaD
B-0+deb10u1) starting as process 4695 ...
May 28 17:20:30 DietPi mysqld[4695]: 2021-05-28 17:20:30 0 [Warning] Could not increase number of max_ope
n_files to more than 16384 (request: 32186)
May 28 17:20:30 DietPi mysqld[4695]: 2021-05-28 17:20:30 0 [Warning] Can't create test file /var/lib/mysq
l/DietPi.lower-test
May 28 17:20:30 DietPi mysqld[4695]: [97B blob data]
May 28 17:20:30 DietPi mysqld[4695]: 2021-05-28 17:20:30 0 [ERROR] Aborting
May 28 17:20:30 DietPi systemd[1]: mariadb.service: Main process exited, code=exi
ted, status=1/FAILURE
May 28 17:20:30 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code
'.
May 28 17:20:30 DietPi systemd[1]: Failed to start MariaDB 10.3.27 database serve
r.

error log seems to be empty ?

readlink /var/lib/mysql

/mnt/dietpi_userdata/mysql

Thinking that there’s no mount to userdata?

what is the output of

readlink -f /var/lib/mysql

can you check if the logfile is present

ls -la /var/log/mysql/

no output on the first and there is a log file present but it is empty

Did you moved your user data to an external disk?

Can you share

ls -la /mnt

Sorry, went away for a few days. Yes user data is on an external drive

output is

total 20
drwxr-xr-x  7 root root 4096 May  4 12:29 .
drwxr-xr-x 21 root root 4096 Jul 30  2020 ..
drwxr-xr-x  2 root root 4096 Aug 21  2020 01D553FD79041680
drwxr-xr-x  2 root root 4096 Mar 29  2020 1cf60123-35fa-4bae-978a-12c82d1b3b26
lrwxrwxrwx  1 root root   57 Mar 29  2020 dietpi_userdata -> /mnt/1cf60123-35fa-4bae-978a-12c82d1b3b26/dietpi_userdata
drwxr-xr-x  2 root root 4096 Jan  7  2020 ftp_client
drwxr-xr-x  2 root root    0 Feb 14  2019 samba
drwxr-xr-x  2 root root    0 Feb 14  2019 samba22

I think I’ve got it. Had to re-mount the user data folder on the external drive and it seems to be happy. I think I’ll keep an eye on this for a while but worth the post in case others get the same issue / errors :smiley:

probably your system lost connection to the external disk. good that it is working now.