MariaDB 10 CentOS 7 moving datadir woes

后端 未结 3 1287
遇见更好的自我
遇见更好的自我 2021-02-04 09:54

Brand new \"minimal\" install of CentOS 7 along with MariaDB 10. I have an additional mounted mirrored volume that I want to use for the datadir. Startup sequence is fine and co

3条回答
  •  北海茫月
    2021-02-04 10:17

    Well that was interesting...

    It turns out, that CentOS 7 "minimal" installs SELinux, which apparently was preventing mysql from writing to the mounted mirrored set. I was looking for security items that I might not have thought about and found it right there in the docs. I had previously thought (obviously erroneously) that SELinux was a distribution, not a module. Once I ran the test to see if it was there....

    getenforce
    

    I temporarily disabled it to test.

    setenforce 0
    

    Finally, I was able to start MariaDB with the directory in the mirrored set as the datadir and no errors. To make this change permanent (because this server is behind a firewall), in /etc/selinux/config, I made

    - SELINUX=enforcing
    + SELINUX=disabled
    

    I hope this helps someone else. Have a great day!

提交回复
热议问题