0

How to set selinux for mysql data directory

hi am trying to change mysql data directory. i dont know how to set selinux policy for mysql newly created data directory... please help me.

MariaDB MySQL (My- Structured Query Language) SELinux Add a comment
stalkjonas
asked Nov 15 2017

Answer

0

try using #semanage fcontext -a -t mysqld_db_t "/path(/.*)?" ...

Add a comment
arunkumarak
asked Nov 16 2017
edited Oct 05 2018
Post your Answer
0

After running that semanage command we should also run another command immediately to apply selinux context for that particular directory.

restorecon -Rv /directory_path

We can use another command to set selinux context, for this command don't run restorecon command because it will restore the context value to previous context

chcon -Rt /directory_path
Add a comment
baseer
asked Dec 28 2017
edited Oct 05 2018
Post your Answer