# yum install mariadb mariadb-server
# systemctl enable mariadb.service # systemctl start mariadb.service
# mysql_secure_installation
# cat /etc/my.cnf [mysqld] character-set-server=utf8 max_allowed_packet = 32M
Feb 6 17:38:56 hoge sh: 2020-02-06 17:38:56 0 [Warning] Can't create test file /home/mysql/hoge .lower-test Feb 6 17:38:56 hoge sh: #007/usr/sbin/mysqld: Can't change dir to '/home/mysql/' (Errcode: 2 "No such file or directory") Feb 6 17:38:56 hoge sh: 2020-02-06 17:38:56 0 [ERROR] Aborting'
vi /usr/lib/systemd/system/mariadb.service ProtectSystem=full ↓↓↓ ProtectSystem=off ProtectHome=true ↓↓↓ ProtectHome=false PrivateDevices=false ↓↓↓ PrivateDevices=true
sed -i 's/^ProtectSystem=full/ProtectSystem=off/g' /usr/lib/systemd/system/mariadb.service sed -i 's/^ProtectHome=true/ProtectHome=false/g' /usr/lib/systemd/system/mariadb.service sed -i 's/^PrivateDevices=false/PrivateDevices=true/g' /usr/lib/systemd/system/mariadb.service grep '^PrivateDevices\|^ProtectHome\|^ProtectSystem' /usr/lib/systemd/system/mariadb.service PrivateDevices=true ProtectSystem=off ProtectHome=false
/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
[Service] TimeoutStartSec=3600
systemctl daemon-reload
# systemctl show mariadb -p TimeoutStartUSec TimeoutStartUSec=1h