I have rebuilt an SD card and did the apt upgrade (all continued to be fine); dist-upgrade caused mariadb to fail to start. However changing the setting to ProtectHome=false
fixes it.
What I have noted is there are 2 different failure modes. As seen here - Mariadb fails after upgrade the original error seen meant the service failed at this command;
Process: 9092 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld
A new install and a dist-upgrade resulted in the service failing later (note process numbers)
Process: 840 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 757 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemc
Process: 752 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 750 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
This error matches my experience. The second failure mode can be fixed by the ProtectHome
fix.
I did get the first error first time, but cannot replicate the error.