# setsebool httpd_can_network_connect_db on<div><br></div><div>I have just tried, but still does not work:</div><div><br></div><div><span class="Apple-style-span" style="font-family:&#39;Times New Roman&#39;;font-size:medium">Can&#39;t connect to local MySQL server through socket &#39;/var/lib/mysql/mysql.sock&#39; (13)</span></div>
<div><font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3"><br></font></div><div><font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3">Any other idea?</font></div><div><font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3"><br>
</font></div><div><font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3">Connecting manually it works</font></div><div><font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3"><br></font></div>
<div><font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3"><div>$ mysql -u root -h localhost -p </div><div>Enter password: </div><div>Welcome to the MySQL monitor.  Commands end with ; or \g.</div><div>
Your MySQL connection id is 2</div><div>Server version: 5.5.17 MySQL Community Server (GPL)</div><div><br></div><div>Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.</div><div><br></div><div>Oracle is a registered trademark of Oracle Corporation and/or its</div>
<div>affiliates. Other names may be trademarks of their respective</div><div>owners.</div><div><br></div><div>Type &#39;help;&#39; or &#39;\h&#39; for help. Type &#39;\c&#39; to clear the current input statement.</div><div>
<br></div><div>mysql&gt;</div></font></div><div><font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3"><br></font></div><div><font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3">Regards<br>
</font><br><div class="gmail_quote">On Sun, Jan 22, 2012 at 11:57 PM, Kernel Guardian <span dir="ltr">&lt;<a href="mailto:kernelgardian@gmail.com">kernelgardian@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>by default apache can&#39;t make a connection to DB. <br>
setsebool httpd_can_network_connect_db on</p>
<p>for permanent change add -P as param to setsebool</p>
<p>for all selinux apache attributes:<br>
getsebool -a | grep httpd</p>
<p>or man page<br>
man httpd_selinux</p>
<p>/var/lib/mysql/mysql.sock is a valid TCP socket with domain UNIX.</p>
<div class="gmail_quote">On Jan 22, 2012 7:04 PM, &quot;bruce&quot; &lt;<a href="mailto:badouglas@gmail.com" target="_blank">badouglas@gmail.com</a>&gt; wrote:<br type="attribution"></div>
<br>--<br>
users mailing list<br>
<a href="mailto:users@lists.fedoraproject.org">users@lists.fedoraproject.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/users</a><br>
Guidelines: <a href="http://fedoraproject.org/wiki/Mailing_list_guidelines" target="_blank">http://fedoraproject.org/wiki/Mailing_list_guidelines</a><br>
Have a question? Ask away: <a href="http://ask.fedoraproject.org" target="_blank">http://ask.fedoraproject.org</a><br>
<br></blockquote></div><br></div>