Hie members
so I was trying to connect to Google cloud sql from an external site
I authorized the ip of the server in google cloud at Instance -> Access Control -> Authorization
and the instance also has been assigned an IP lets say 'X.X.X.X', and a user also has been created with User name 'username' and password 'password'
now the connection code for connecting google cloud sql I used is as follows
$db = new pdo('mysql:host=X.X.X.X;dbname=db','username','password');
and I tried opening the page and I am getting the following error
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Connection timed out' in /home/kannadakavana/public_html/test.php:17 Stack trace: #0 /home/kannadakavana/public_html/test.php(17): PDO->__construct('mysql:host=X....', 'username', '') #1 {main} thrown in /home/kannadakavana/public_html/test.php on line 17
what am I doing wrong ?