Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.3Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  / ...  / Security  / SELinux  /  Changing the SELinux Mode

6.7.2 Changing the SELinux Mode

SELinux supports enforcing, permissive, and disabled modes. Enforcing mode is the default. Permissive mode allows operations that are not permitted in enforcing mode and logs those operations to the SELinux audit log. Permissive mode is typically used when developing policies or troubleshooting. In disabled mode, polices are not enforced, and contexts are not applied to system objects, which makes it difficult to enable SELinux later.

To view the current SELinux mode, use thesestatus command mentioned previously or thegetenforce utility.

$> getenforceEnforcing

To change the SELinux mode, use thesetenforce utility:

$> setenforce 0$> getenforcePermissive
$> setenforce 1$> getenforceEnforcing

Changes made withsetenforce are lost when you restart the system. To permanently change the SELinux mode, edit the/etc/selinux/config file and restart the system.