[thelist] PHP/MySQL host setting

bruce bedouglas at earthlink.net
Mon Oct 30 13:26:58 CST 2006


coming in this conversation on the end.. so skip if this has already been

if you have access to the mysql app, on the cmnd line, you can simply get
into mysql, and setup the grant access to the databases/tables that you
need. this will guarantee that you know the host/port/user/passwd for your
given app...

localhost only works if you're running the mysql on the same server as the
apache.. if you're dealing with a larger system.. your apache and mysql will
often be on separate servers/ip addresses....

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of apathetic
Sent: Monday, October 30, 2006 11:05 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] PHP/MySQL host setting

Brooking, John wrote:
>    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,

Yes, your ISP should definitely be able to tell you how to connect to
the MySQL database.

One other possibility is that you could try passing no arguments to
mysql_connect and see if the default PHP settings get you in.


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