PDO mysql Connection issue

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

 



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?

[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