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


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


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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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