MySQL is not working on PHP with Fedora 16

Fedora Linux fedoralinux at
Mon Jan 23 18:22:31 UTC 2012

# setsebool httpd_can_network_connect_db on

I have just tried, but still does not work:

Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)

Any other idea?

Connecting manually it works

$ mysql -u root -h localhost -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input



On Sun, Jan 22, 2012 at 11:57 PM, Kernel Guardian
<kernelgardian at>wrote:

> by default apache can't make a connection to DB.
> setsebool httpd_can_network_connect_db on
> for permanent change add -P as param to setsebool
> for all selinux apache attributes:
> getsebool -a | grep httpd
> or man page
> man httpd_selinux
> /var/lib/mysql/mysql.sock is a valid TCP socket with domain UNIX.
> On Jan 22, 2012 7:04 PM, "bruce" <badouglas at> wrote:
> --
> users mailing list
> users at
> To unsubscribe or change subscription options:
> Guidelines:
> Have a question? Ask away:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list