Allow mysql connection over php/apache by Moti Levy 2011-12-21 If you’re running selinux and cant connect to your db , try this : setsebool -P httpd_can_network_connect 1