<div>Hello</div><div><br></div>By command line I am able to connect normally, so the problem is not MySQL... I use &quot;mysql -u root -h localhost -p&quot; and it works... Note that the application also uses root since it must create the database and a user for the application...<div>
<br><div>I have tried to restart MySQL and the whole system, but it still does not connect from PHP</div><div><br></div><div>The error is:</div><div><div><div>[error] [client ::1] PHP Warning:  mysql_connect(): Can&#39;t connect to local MySQL server through socket &#39;/var/lib/mysql/mysql.sock&#39; (13) in /var/www/html/install2.php on line 22, referer: <a href="http://localhost/install.php">http://localhost/install.php</a></div>
</div></div><div><br></div><div>So I guess the problem is in the PHP, Apache or on the interface between MySQL and Apache/PHP...</div><div><br></div><div>Any other suggestion?</div><div><br></div><div>Regards</div><div><br>
<div class="gmail_quote">On Sun, Jan 22, 2012 at 12:04 PM, bruce <span dir="ltr">&lt;<a href="mailto:badouglas@gmail.com">badouglas@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">
hi...<br><br>ok.. basic debug stuff.. skip if you&#39;ve already done..<br>-using the user/passwd.. can you access mysql from the cmdline..<br>   [i assume you can]<br>-what are the permissions on the mysql db/tbls? have they changed?<br>

--did you stop/restart mysql?<br>-what do the mysql logs say?<br><br>let us know..<br><br><br><div class="gmail_quote"><div><div class="h5">On Sun, Jan 22, 2012 at 12:28 PM, Mike Wright <span dir="ltr">&lt;<a href="mailto:mike.wright@mailinator.com" target="_blank">mike.wright@mailinator.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">On 01/22/2012 07:02 AM, Fedora Linux wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello<br>
<br>
I have a web application but it is not working on my Fedora 16 with PHP,<br>
for some reason it is unable to connect to the MySQL server, it returns<br>
the error:<br>
<br>
[Sun Jan 22 08:40:24 2012] [error] [client ::1] PHP Warning:<br>
  mysql_connect(): Can&#39;t connect to local MySQL server through socket<br>
&#39;/var/lib/mysql/mysql.sock&#39; (13) in /var/www/html/install2.php on line<br>
22, referer: <a href="http://localhost/install.php" target="_blank">http://localhost/install.php</a><br>
<br>
Notice that the user/password is correct, the PHP is installed and<br>
working and MySQL is up and running...<br>
<br>
Even the socket is there<br>
<br>
# ls -l /var/lib/mysql/mysql.sock<br>
srwxrwxrwx. 1 mysql mysql 0 Jan 22 08:37 /var/lib/mysql/mysql.sock<br>
<br>
What can be the problem? The application is okay, I am using it in a<br>
production server and it is running in 2 other local computers (with<br>
slackware) for testing purposes...<br>
<br>
This is the first time that I can&#39;t connect to MySQL via PHP... I don&#39;t<br>
know if it requires an extra configuration or there is a missing package<br>
that I should install... the httpd log does not give more details...<br>
<br>
Thanks for any help!<br>
</blockquote>
<br>
Do you have port 3306 open on your firewall?<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br><span><font color="#888888">
</font></span></blockquote></div></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888">
<br>
-- <br>
users mailing list<br>
<a href="mailto:users@lists.fedoraproject.org" target="_blank">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.<u></u>org/mailman/listinfo/users</a><br>
Guidelines: <a href="http://fedoraproject.org/wiki/Mailing_list_guidelines" target="_blank">http://fedoraproject.org/wiki/<u></u>Mailing_list_guidelines</a><br>
Have a question? Ask away: <a href="http://ask.fedoraproject.org" target="_blank">http://ask.fedoraproject.org</a><br>
</font></span></font></span></blockquote></div><br>
<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></div>