1. 程式人生 > >資料庫連線permission denied

資料庫連線permission denied

通常情況下載安裝完CentOS7後,預設情況下SElinux是啟用狀態

此時,需要將SElinux關閉

[[email protected] ~]# sestatus  
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31


[[email protected] ~]# setenforce 0


[[email protected] ~]# sestatus  
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31

如果要永久關閉,可以修改配置檔案/etc/selinux/config,將SELINU置為disabled。