Re: Re: PDO question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On November 28, 2012 at 4:11 PM Jim Giner <jim.giner@xxxxxxxxxxxxxxxxxx>
> wrote:
> On 11/28/2012 3:58 PM, admin@xxxxxxxxxxxxxxxxxxx wrote:
> >
> > Guys,
> > 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=171.16.23.44;dbname=test', 'user','password');
> >
> > ERROR: Access denied for user 'user'@'localhost' (using password: YES) in
> > /var/www/html/text.php
> >
> > Any clue as to WHY it keeps referring back to localhost when i clearly set
> > the
> > host parameter to another server.
> > I checked the /etc/hosts records to see if there was a referral for that
> > domain
> > 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
>

In reading your question again, I get what you are saying. Let me explain.

It is not actually saying 'localhost' it is saying 'server1.mydomain.com' of the
server I am connecting from.
not the server2.mydomain.com.

I have ensured the path is correct, PING, NSLOOKUP from the server trying to
make the connection.
It changes the domain

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux