Can‘t create test file /home/mysql/data1/localhost.lower-test

天下文章一大抄,

搜索“ Can't create test file /home/mysql/data/localhost.lower-test”

出来的全都是说selinux,或者什么appammor的。

 

最后找到了

https://www.e-learn.cn/content/wangluowenzhang/683730

这才是正确的。

vi /usr/lib/systemd/system/mariadb.service
找到:

ProtectHome=true

改为:

ProtectHome=false

然后

systemctl daemon-reload

systemctl start mariadb