I have an ubunut Compute Engine instance and a postgres Cloud SQL instance, both part of the same project and both in the same zone. I want to connect to the Cloud SQL from the Compute Engine but am having some trouble
My postgres has the default user setup and a new DB added. I have reserved a static IP for my Compute Engine and added this IP to authorised list in postgres. I've tried connecting (from the cloud shell) both with a python script using psycopg2 and directly from bash using psql. The error messages I get in both cases:
Connection timed out
Is the server running on host "xx.xxx.xxx.xx" and accepting
TCP/IP connections on port 5432?
Address omitted, but it is correct. The thing I can't be sure of is whether postgres is listening on the port as there is no (?) config option for this from the dashboard - though I would assume it to be running on 5432 (default)
Is there anything, either postgres or Google Cloud Infrastructure specific that I have missed?