On 11/28/2012 4:18 PM, ad...@buskirkgraphics.com wrote:

On November 28, 2012 at 4:11 PM Jim Giner <jim.gi...@albanyhandball.com> wrote:
On 11/28/2012 3:58 PM, ad...@buskirkgraphics.com wrote:

I am not quiet sure what is happening but every time i try to connect to a
remote host it refers back to localhost.

$pdo = new PDO('mysql:host=;dbname=test', 'user','password');

ERROR: Access denied for user 'user'@'localhost' (using password: YES) in

Any clue as to WHY it keeps referring back to localhost when i clearly set
host parameter to another server.
I checked the /etc/hosts records to see if there was a referral for that
back to it's self there is NOT.

Just a WAG from a guy who's never tried to do this.

Could the localhost in question actually be the server you are failing
to connect to, and not your client machine? You are sure about your
uid/pswd? dbname?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

I actually do not allow the user in the connection string to connect locally
which makes me think it is not accepting the host parameter and defaulting to
the localhost.
I would expect this if connecting localhost but the IP is not the local host IP.

My question is WHY is it changing the host parameter?

Like I said just a WAG, but are you sure about my other questions? My point is perhaps the error message itself is a little confusing and the response from the sql server is using the term localhost to refer to itself, but that message is getting passed back to your server and then to you, causing perhaps(?) some confusion.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to