Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-23-2012, 02:29 PM   #1
LQ Newbie
Registered: Jul 2012
Posts: 1

Rep: Reputation: Disabled
selinux httpd_can_network_connect_db question

Hi everyone,

I have a question related to SELinux and in particular the httpd_can_network_connect_db flag.

I'm running fedora virtual machine inside a win 7 machine. About a year ago I installed phpMyAdmin and it ran without any problems. A week ago I tried going to http://localhost/phpMyAdmin and it gave me the following error (after entering the user and password into the login page of phpMyAdmin):

"2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)"

The SELinux icon went on in the desktop. After searching on the web, I found that I can fix the problem with this command:

# setsebool -P httpd_can_network_connect_db on

After that I can go into phpMyAdmin without problems. Just to test it out, I turn off the flag with:

setsebool -P httpd_can_network_connect_db off

and I verified that the flag is indeed off:

# getsebool httpd_can_network_connect_db
httpd_can_network_connect_db --> off

However, even after a reboot and clearing my firefox history, I can still go phpMyAdmin without any error.

Here are my questions:

1. Why is it that I can go into phpMyAdmin a year ago without problems? There was no more updates to Fedora 14 I access phpMyAdmin last year. What could have caused the change?

2. Why is it that when I turn *off* httpd_can_network_connect_db (after turning it on) I can still run phpMyAdmin?

I just wanted to know in case this issue comes up again especially in later fedora releases.

Thanks for your replies.

Old 07-25-2012, 03:43 AM   #2
LQ Newbie
Registered: Jul 2012
Posts: 3

Rep: Reputation: Disabled

Have you checked your selinux status in fedora? If the Selinux status is in permissive mode then you can able to access the site, but if it is in enforcing mode then you have to enable the flag.
Old 12-24-2013, 12:47 AM   #3
LQ Newbie
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
You can use -P option


This post is old but is a reference from , the answer is: setsebool -P httpd_can_network_connect_db on


Thanks a lot.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] A question about selinux... trist007 Linux - Newbie 2 06-19-2011 09:19 AM
SELinux question sang_froid Linux - Security 1 01-28-2010 03:13 PM
SELINUX Question Iamriccati Linux - Enterprise 1 12-04-2007 06:44 PM
SELINUX Question Iamriccati Linux - Server 2 12-04-2007 04:23 PM
selinux question ronin4601 Linux - Newbie 0 04-18-2004 01:59 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration