I'd like to for once leave SELinux running on a server for the alleged increased security.
I usually disable SELinux to get anything to work.
How do I tell SELinux to allow MySQL connections?
The most I've found in the documentation is this line from mysql.com:
If you are running under Linux and Security-Enhanced Linux (SELinux) is enabled, make sure you have disabled SELinux protection for the mysqld process.
wow … that's really helpful.
Best Answer
To check SELinux
To see what flags are set on httpd processes
To allow Apache to connect to remote database through SELinux
Use -P option makes the change permanent. Without this option, the boolean would be reset to 0 at reboot.