Can't Connect to Cloud SQL from Compute Engine

60 views
Skip to first unread message

Danny Tran

unread,
May 1, 2018, 9:50:46 AM5/1/18
to Google Cloud SQL discuss
I recently set up a Google Cloud SQL as well as a Compute Engine, however, I am having issues connecting to it. I have included my IP address in the authorized network tab but I am still unable to get through. The only error that PDO returns is this:
SQLSTATE[HY000] [2002] Connection timed out

Any help would be greatly appreciated! Thank you.

Karthick (Cloud Platform Support)

unread,
May 1, 2018, 4:17:58 PM5/1/18
to Google Cloud SQL discuss
Hello, 

I am assuming that you are running PDO on GCE instance for db connectivity and you have authorized the static IP address( not ephemeral) of the instancei n Cloud SQL Authorisation[1]. However, I recommend you to read this article[2] that contains the most frequent issues with the Google Cloud SQL and the steps to take in order to resolve them. You may also want to check these stackoverflow threads[3][4] where this type of error is addressed. And if you are still experiencing the issue, in order to investigate further, I will need you to provide the following information in a private message: 



Reply all
Reply to author
Forward
0 new messages