[thelist] PHP/MySQL host setting

Nan Harbison nanharbison at earthlink.net
Mon Oct 30 13:35:42 CST 2006

Godaddy has a bizarre setup for the hostname, different websites have
different hostnames, one of mine is mysql1231.secureserver.net, but they
provide the connection information on the hosting manager page.
That is ridiculous that they don't provide it for you. It should be posted
in their help files somewhere.

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Brooking, John
Sent: Monday, October 30, 2006 1:30 PM
To: thelist at lists.evolt.org
Subject: [thelist] PHP/MySQL host setting

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 '' 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

   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.


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

More information about the thelist mailing list