RE: PDO question

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

 



> -----Original Message-----
> From: Jim Lucas [mailto:lists@xxxxxxxxx]
> Sent: Wednesday, November 28, 2012 9:23 PM
> To: admin@xxxxxxxxxxxxxxxxxxx
> Cc: php-general@xxxxxxxxxxxxx
> Subject: Re:  PDO question
> 
> On 11/28/2012 12: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.
> >
> 
> There is a warning on the following page that talks about a possible
> issue with connections.  Might give it a look.
> 
> http://www.php.net/manual/en/ref.pdo-mysql.connection.php
> 
> --
> Jim Lucas
> 
> http://www.cmsws.com/
> http://www.cmsws.com/examples/


Thank you issue resolved for some reason it was passing the credentials with the fully qualified domain name and NOT the IP and the permission failed to match.
Not sure why it is suddenly passing the fully qualified domain name now but as long and this works I really don’t care thanks.

 







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




[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