I want to connect to a remote instance of MySQL (Google Cloud SQL one) using my IPv6 address.
I am using PHP PDO as follows:
$db = new \PDO('mysql:host=<ipv6-address>;port=3306;dbname=<database-name>', '<username>', '<password>' );
But it always fails with the following exception message:
PDOException: SQLSTATE [HY000] [2002] No host route
From the terminal, I can connect to the MySQL instance without any problems, for example:
mysql --host=<ipv6-address> --user=<username> --<password>
Any help would be really appreciated.
thanks
source share