SELinux is preventing the httpd access by default.
Situation
While connecting mysql database from web, getting this error.
python: SELinux is preventing httpd from connectto access on the unix_stream_socket /var/lib/mysql/mysql.sock
Solution
Run below command to allow httpd in Selinux.
[root@nsk ~]# ausearch -c 'httpd' --raw | audit2allow -M my-httpd
******************** IMPORTANT ***********************
To make this policy package active, execute:
semodule -i my-httpd.pp
[root@nsk ~]# semodule -i my-httpd.pp
Hope it helps.
Friday, September 14, 2018
Home
/
Linux General
/
python: SELinux is preventing httpd from connectto access on the unix_stream_socket /var/lib/mysql/mysql.sock - Mariadb running on RHEL 7
python: SELinux is preventing httpd from connectto access on the unix_stream_socket /var/lib/mysql/mysql.sock - Mariadb running on RHEL 7
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment