lets say that may app has:
GAE app id: foo123
GAE app name: foo
GAE cloud SQL instance id: foo123:myInstance
I have set the root password to "foobar" in the access control of the Cloud SQL instance.
try{
$pdo = new pdo("mysql:unix_socket=/cloudsql/foo:foo123:myInstance;charset=utf8", "root", "");
}catch(PDOException $ex){
die(json_encode(
array('outcome' => false, 'message' => 'Unable to connect')
)
);
}
But it can not connect. I'm testing from localhost:8080. The Cloud SQL instance location is USA and my location is Europe.
How can I see what is causing this?
Thanks. I have also tried root@"" with no success.
I'm doing exactly as the docs in here: https://developers.google.com/appengine/docs/php/cloud-sql/