NO PLEASE DO NOT DO THIS!
It is the reason the fault occurred in the first place.
The correct “fix” is to
sudo systemctl edit mariadb.service
then to that blank file add
[Service]
ProtectHome=false
and save with ctrl-x, y, enter.
Then reload the service and restart
sudo systemctl daemon-reload
sudo systemctl restart mariadb
This will ensure the same thing doesn’t happen again next time there is an upgrade to the default service unit, regardless of the upgrade command you chose.