Reply to Re: Cannot get mysql_connect to work

Your name:

Reply:


Posted by Jerry Stuckle on 12/29/05 05:57

Michael wrote:
> Jerry and Gordon,
>
> Thank you for taking the time to write out these superb explanations; I
> and I'm sure others appreciate it. Just a few more question, if I
> may...
>
> 1. How does the browser know that it should translate
> http:/localhost/myFile.html into /var/www/html/myFile.html? Is there an
> ini file somewhere that contains this information?
>
> 2. This thread got started because the first mysql call (see below)
> failed, but when I changed localhost to 127.0.0.1, as in the second
> call, it worked. Given the information I have from you now, I don't see
> how the first call could ever work, although the documentation says
> that it should. Any ideas?
>
> $conn = mysql_connect("localhost", "root", ""); // This fails.
> $conn = mysql_connect("127.0.0.1", "mike", ""); // This works.
>
> Thanks again for your help,
> M. McDonnell
>


OK, so it's connecting through the TCP/IP port, but not through your socket.

Does /var/lib/mysql/mysql.sock exist? If not, where is mysql.sock?

Note in some versions it might be mysqld.sock.

Also, some distros use a different configuration file. I know debian
does, for instance. But I'm not sure which distro you're using, or if
you're using the MySQL package for your distro.

In any case, this looks like a mysql problem more than a PHP one. You
might be better off following up in comp.databases.mysql, where the
mysql gurus hang out.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация