Mariadbの保存ディレクトリをmy.cnf出変更した後
Mariadbを起動しようとすると下記のようなエラーが発生起動できませんでした。
Jan 10 10:03:42 localhost mysqld: 2018-01-10 10:03:42 140713415448832 [Warning] Can't create test file /home/mysql/localhost.lower-test
Jan 10 10:03:42 localhost mysqld: #007/usr/sbin/mysqld: Can't change dir to '/home/mysql/' (Errcode: 13 "Permission denied")
Jan 10 10:03:42 localhost mysqld: 2018-01-10 10:03:42 140713415448832 [ERROR] Aborting
Jan 10 10:03:42 localhost systemd: mariadb.service: main process exited, code=exited, status=1/FAILURE
プロテクトが標準で有効になっているため、/usr/lib/systemd/system/mariadb.serviceファイルを下記のように変更します。
mariadb.service
# Prevent writes to /usr, /boot, and /etc
ProtectSystem=off
# Doesn't yet work properly with SELinux enabled
# NoNewPrivileges=true
PrivateDevices=true
# Prevent accessing /home, /root and /run/user
ProtectHome=false
mariadbを起動して正常に起動すればOK