I am trying to remotely connect to MySQL server online from my local machine, but I am getting the following error:
Warning: PDO::__construct(): The server r
I ran into this same problem and figured out the problem had indeed to do with PHP.
The solution was simple for me: switch to mysqli instead of PDO. When using Zend_Db, this is as easy as changing 1 line:
$db = Zend_Db::factory('pdo_mysql',array('host' => MYSQL_HOST, 'username' => MYSQL_USER, 'password' => MYSQL_PASS, 'dbname' => MYSQL_SCHEMA));
Becomes
$db = Zend_Db::factory('mysqli',array('host' => MYSQL_HOST, 'username' => MYSQL_USER, 'password' => MYSQL_PASS, 'dbname' => MYSQL_SCHEMA));
But if you application is not using the Zend_Db abstraction (or any other) layer, you could be in trouble.