Kanarpp
Kanarpp

Reputation: 179

mariadb.service: Failed to set up mount namespacing: Permission denied / Failed at step NAMESPACE spawning

I just installed MariaDB and the status is :

* mariadb.service - MariaDB 10.3.18 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-01-28 15:29:00 UTC; 2s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/

Jan 28 15:29:00 54 systemd[1]: Starting MariaDB 10.3.18 database server...
Jan 28 15:29:00 54 systemd[29206]: mariadb.service: Failed to set up mount namespacing: Permission denied
Jan 28 15:29:00 54 systemd[29206]: mariadb.service: Failed at step NAMESPACE spawning /usr/bin/install: Permission denied
Jan 28 15:29:00 54 systemd[1]: mariadb.service: Control process exited, code=exited, status=226/NAMESPACE
Jan 28 15:29:00 54 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 28 15:29:00 54 systemd[1]: Failed to start MariaDB 10.3.18 database server.

Can I have some help to start MariaDB Thx

Upvotes: 5

Views: 13930

Answers (2)

user15378522
user15378522

Reputation: 51

I had to do both:

ProtectHome=false
ProtectSystem=false

and uncomment:

#PrivateDevices=false

Upvotes: 5

hanzi
hanzi

Reputation: 2987

This question is quite old – but since I found it through Google after running into the same issue, here’s my solution:

The problem started occurring after updating a MariaDB instance running inside an LXC container.

As a quick fix, I created /etc/systemd/system/mariadb.service.d/lxc.conf with the following contents:

[Service]
ProtectHome=false
ProtectSystem=false

# These settings turned out to not be necessary in my case, but YMMV
#PrivateTmp=false
#PrivateNetwork=false
#PrivateDevices=false

After that, run systemctl daemon-reload and systemctl restart mariadb and everything should work again.

Upvotes: 21

Related Questions