[thelist] PHP/MySQL host setting

patrick pms at stoutstreet.com
Mon Oct 30 13:02:29 CST 2006

Brooking, John wrote:
> 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
> PHP4.
>    Any advice? Thanks in advance!
> - John

Try localhost.localdomain


patrick sanders
web sites that fit

More information about the thelist mailing list