Thanks for reporting.
I would not recommend running sudo apt-get dist-upgrade
. Instead running sudo apt-get update && sudo apt-get upgrade
will update all installed packages and apply any security fixes.
This issue is being discussed:
opened 10:43AM - 13 Feb 19 UTC
closed 07:12PM - 03 May 19 UTC
Discussion https://community.openenergymonitor.org/t/mariadb-cannot-connect-afte… r-dist-upgrade/10071/4
Solution;
Change in file /lib/systemd/system/mariadb.service the value:
```
ProtectHome=true
```
to
```
ProtectHome=false
```
It may be that the dist-upgrade has introduced a new service file that now has the value as **true** or else this file is edited in the EmonSD build (which is still a closely guarded secret).
Editing **any** service file is a **bad idea**. Instead;
```
sudo systemctl edit mariadb.service
```
then add
```
[Service]
ProtectHome=false
```
Save file then;
```
sudo systemctl daemon-reload
sudo systemctl restart mariadb.service
```
This change is then protected if the service file is updated.
I’ve just tested running sudo apt-get update & sudo apt-get upgrade on a stock emonSD-30Oct18 and mariadb was still running and not effected by any updates. The issue should only effect dist-upgrade as reported:
https://community.openenergymonitor.org/t/mariadb-cannot-connect-after-dist-upgrade/10071
Maridb will fail to start after running sudo apt-get dist-upgrade to fix edit:
/lib/systemd/system/mariadb.service the value:
ProtectHome=true
to
ProtectHome=false
I would not recommend runn…