Re: PDO mysql Connection issue

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

 



> On Wednesday, November 28, 2012 at 4:50 PM, admin@xxxxxxxxxxxxxxxxxxx wrote:
>> I am having a PDO mysql connection issue I cant explain.
>> 
>> On server server1.mydomain.com (http://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 (http://server2.mydoamin.com) they are 2 different
>> servers.
>> This script returns an error:
>> ERROR: Access denied for user 'user'@'server1.mydomain.com (http://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?
> 
> 
> Have you tried running FLUSH HOSTS on the MySQL server?
> 
> Also, i would try to disable DNS within MYSQL by starting with --skip-name-resolve (http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_skip-name-resolve);
> 
> -- 
> Mike Mackintosh
> PHP 5.3 ZCE
> 
I have tried the options listed same results. 
-- 
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