← Back to team overview

maria-discuss team mailing list archive

Re: Maria-db refuses to start

 

Op 13-10-2022 om 01:46 schreef Daniel Black:
On Thu, Oct 13, 2022 at 12:27 AM Jogchum Reitsma
<jogchum.reitsma@xxxxxxxxx>  wrote:

Anyone an idea why /home/jogchum/mysql_recover/linux-mkay.lower-test
can't be created and how to solve that?
In systemd ProtectHome=read-only is the default.

systemctl edit mariadb.service and add:
[Service]
ProtectHome=false

If I issue that command, it translates to

nano/etc/systemd/system/mariadb.service.d/.#override.conf5a67e18e4e904390

and  the first lines of that file read

## Editing /etc/systemd/system/mariadb.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file



### Lines below this comment will be discarded

When I read /usr/lib/systemd/system/mariadb.service it contains

# Prevent accessing /home, /root and /run/user
ProtectHome=true

I know hardly anything about systemd, so not user waht I should do here?

regards, Jogchum



https://mariadb.com/kb/en/systemd/#useful-systemd-options

You may also need to selinux relabel the new directory:

sudo semanage fcontext -a -t mysqld_db_t "/home/jogchum/mysql_recover(/.*)?"
sudo restorecon -Rv /home/jogchum/mysql_recover

https://mariadb.com/kb/en/selinux/#setting-the-file-context-for-the-data-directory


Follow ups

References