To run MariaDB SQL from /home, in the file /usr/lib/systemd/system/mariadb.service
or /lib/systemd/system/mariadb.service
, just change :
ProtectHome=true
to :
ProtectHome=false
然后重载配置
systemctl daemon-reload
或者
The answer by Thomas is correct, but get's reset by updates every few months. So here is a permanent solution:
Use systemctl edit mariadb
to create a file overwritting the default settings of the mariadb service. (In debian it's located in /etc/systemd/system/mariadb.service.d/override.conf
)
Set the same setting Thomas changed in the file:
[Service]
ProtectHome=false
Use systemctl daemon-reload
to reload the systemctl config.
参照:https://stackoverflow.com/questions/38529205/mariadb-cannot-start-after-update-warning-cant-create-test-file-home-mysql
没有评论