时间:2021-07-01 10:21:17 帮助过:41人阅读
保存,重启httpd
/etc/init.d/httpd restart  或者 systemctl restart httpd
刷新网页,mysql已经能连上了。
解决不能打开/var/www/http/目录网页idex页面问题
查看SELinux状态(如果SELinux status参数为enabled即为开启状态)
/usr/sbin/sestatus -v
SELinux status: enabled      《---------此处为enable
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
1、临时关闭(不用重启机器): 
##设置SELinux 成为permissive模式 
##setenforce 1 设置SELinux 成为enforcing模式
setenforce 0
2、修改配置文件需要重启机器: 
修改/etc/selinux/config 文件
~]# vim /etc/selinux/config 第7行代码:SELINUX=enforcing 修改成:SELINUX=disabled 然后重启机器;
centos7 解决 mysql_connect()不支持请检查mysql模块是否正确加载
标签:lib64 sha 关闭selinux lda version star 存在 解决 deny