[thelist] PHP/MySQL host setting

Brooking, John John.Brooking at sappi.com
Mon Oct 30 12:29:58 CST 2006


Dear LAMP experts,

   In all my work with PHP/MySQL so far (a few years now), I've always
provided 'localhost' as the hostname argument in the mysql_connect call.
This is not only on my local development machine, but also at the ISP's
I've used (two different ones). I am now working with an ISP who does
not seem to know what to tell me to use, and 'localhost' is not working,
nor is '127.0.0.1' nor is the DNS name of the host ('www.thercc.org').
He now wants to go beyond the initial setup fee and charge an hour of
labor (USD 85) to help me discover the answer.

   Is this something I should know myself? Are there a few other things
I could try? Am I wrong to think that if the hostname string is other
than the ones I've already tried, he should provide me with that
information as part of the initial setup, not as something he should
have to research and charge additional money for? (The person I'm
talking to is somewhat technical, but I don't think he's the one doing
the actual setup work.)

   By the way, the errors I get are either "Can't connect to local MySQL
server through socket
> '/var/lib/mysql/mysql.sock' (2)" (using 'localhost') or "Lost
connection to MySQL server during query" (using the others). I suspect
that I am his first client using MySQL from PHP5, but it also will not
work from PHP4. I do not know if he has other clients using MySQL from
PHP4.

   Any advice? Thanks in advance!

- John
-- 


This message may contain information which is private, privileged or confidential and is intended solely for the use of the individual or entity named in the message. If you are not the intended recipient of this message, please notify the sender thereof and destroy / delete the message. Neither the sender nor Sappi Limited (including its subsidiaries and associated companies) shall incur any liability resulting directly or indirectly from accessing any of the attached files which may contain a virus or the like.




More information about the thelist mailing list