SELinux enable mysql remote access — разрешить удаленный доступ к mysql
setsebool -P httpd_can_network_connect_db 1
To check SELinux
sestatus
To see what flags are set on httpd processes
getsebool -a | grep httpd
To allow Apache to connect to remote database through SELinux
setsebool httpd_can_network_connect_db 1
Use -P option makes the change permanent. Without this option, the boolean would be reset to 0 at reboot.
setsebool -P httpd_can_network_connect_db 1