Re: PDO mysql Connection issue

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

 



"admin@xxxxxxxxxxxxxxxxxxx" wrote:

> I am having a PDO mysql connection issue I cant explain.
> 
> On server server1.mydomain.com
> I have a test script
> <?php
> $pdo = new PDO('mysql:host=171.16.23.44;dbname=test', 'user','password');
> ?>
> 171.16.23.44 is by an A record called server2.mydoamin.com  they are 2
> different servers.
> This script returns an error:
> ERROR: Access denied for user 'user'@'server1.mydomain.com' (using
> password: YES)
> 
> I find this ODD because that is not the server i am connecting TO but
> FROM. Why would the PDO connection be referring back to its own localhost
> instead of the intended domain.
> I have tried this by fully qualified domain name, same thing.
> I have ensured the route does exist on the connecting server.
> I have ensured there is no local reference to the domain name/IP back to
> its self.
> 
> I log into 171.16.23.44 and there is NO record of the failed attempt.
> I validate the user has remote access rights.
> I validate there is not a firewall rule blocking the host/port/you name
> it. I telnet from the server to the destination via port 3306 it connects.
> 
> BTW (171.16.23.44) IS FAKE I AM USING THE IP AS AN EXAMPLE HERE.
> 
> Any clue as to WHY the host parameter is not setting or is it setting and
> something else is wrong?

You are attempting a connection by user@xxxxxxxxxxxxxxxxxxxx

This request is made to the mysql server on host server2.mydomain.com which 
responds with the error that access is denied for the user named 'user' on 
host server1.mydomain.com

The most likely problem is that on server2.mydomain.com you do not have 
mysql privileges for user@xxxxxxxxxxxxxxxxxxxx

-- 
Cheers
David Robley

People in the passing lane that don't pass will be shot.


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