Take the 2-minute tour ×

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer


