Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to setup phpMyAdmin to use with a remote MySQL databases on Scientific Linux release 6.2.

If I use the mysql command line to connect to the remote database it works great but if I use mysqladmin I am getting "#2002 Cannot log in to the MySQL server".

I have found if I do a:

setenforce 0

It will work from myphpadmin to my remote database but once I reboot or set Scientific Linux setenforce back to one it stops working again..

I know setenforce 0 is not the right thing to do but can someone please give me details steps on how to get this working the right way... thanks I am new to Scientific Linux and been having some issues.. thanks

share|improve this question
up vote 0 down vote accepted

All I had to do was setsebool -P httpd_can_network_connect=1 and now its working

share|improve this answer

Actually, setenforce 0 isn't completely bad. It's not the best option, no, but it's acceptable (IMHO). To maintain that setting across reboots, go into the /etc/sysconfig/selinux file if that host and set the SELINUX= line to

share|improve this answer
No my system admin's would like it set seenforce 1 so how do I do this.. someone said something about rules? – techsjs2012 Dec 6 '12 at 16:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.