NYCPHP Meetup

NYPHP.org

[nycphp-talk] mysql connection

William Klein willie at pdfsystems.com
Tue Nov 16 15:14:37 EST 2010


Here is the solution.  Selinux will not allow httpd to connect to other
network servers by default.
The command to change this behavior is

setsebool -P httpd_can_network_connect=1

Everything works immediately and survives a reboot


-----Original Message-----
From: William Klein [mailto:willie at pdfsystems.com] 
Sent: Monday, November 15, 2010 11:17 AM
To: 'NYPHP Talk'
Subject: Re: [nycphp-talk] mysql connection

When I get to the bottom of what's happening I will post my ultimate
resolution.
But the MySQL server is listening on the port.  Here's why I thought it was
my PHP setup
The apache server will connect to mysql running on the local host with
selinux enforcing
I can connect to the remote mysql server with command line mysql commands 
Mysql -u root -h 192.168.199.31 -p
The apache server will not connect to the remote server with selinux
enforcing.
The apache server will connect to the remote server with selinux in
permissive mode.

Therefore I have come to the conclusion that my issue is with selinux.
Since I want the security enhanced features of selinux I will figure out
what the issue is and post the ultimate resolution.

I appreciate all the input and I will post back what I find.

-----Original Message-----
From: Donald J. Organ IV [mailto:dorgan at donaldorgan.com] 
Sent: Friday, November 12, 2010 10:00 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] mysql connection

Apache doesn't connect to mysql.... I believe your issue is what I stated
earlier mySQL is not listening on your private ip address....edit your
my.cnf file
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation




More information about the talk mailing list