SELinux, Apache, phpMyAdmin, and a Remote MySQL Server

Posted on the October 11th, 2007 under Sys Admin by jglemza

Today I ran into a little problem with phpMyAdmin talking to a remote MySQL server on a CentOS 5 machine. When I would try to connect to the server it would say that the host could not be reached. However, if I used the mysql cli I was able to connect. It turns out that the SELinux policy was prohibiting me from accomplishing this. To fix this problem you need to modify the policy with the following command.
setsebool -P httpd_can_network_connect=1
This change is instant and persistent, so it will survive a reboot.
Bookmark and Share

2 Responses to 'SELinux, Apache, phpMyAdmin, and a Remote MySQL Server'

  1. November 20, 2007 at 6:14 pm
    davidmintz
  2. April 14, 2009 at 3:36 am
    mogyiman

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>