Connecting to PostgreSQL on Google Cloud from DataGrip

How to connect to PostgreSQL on Google Cloud from DataGrip?

1
5 comments

Thanks for the obvious hint. Unfortunately, connecting to Google's PostgreSQL is much more complicated than the instructions covered in help. For some reason, there is help for PostgreSQL on Heroku and it would be nice to have something similar for Google. (although my case has been already resolved by a friend).

0

@Lekskeks So what was the difference? To enable SSL or something else? 

 

-4

Hi, to help anyone else in the future, here is how to connect.

 

On the cloud console go to your SQL instance and add your ip to under the CONNECTIONS tab in your instance view, the same way your would add an App from app engine or compute engine.

This will enable you to connect to your instance from your local machine for as long ass your ip remains the same. (Use 5432 as the port, not sure why 3307 isn't used)

The other option is to use CLOUD SQL PROXY which you need to run everytime you want to connect and then simply set the IP in Datagrip to 127.0.0.1 if you are going the Cloud SQL Proxy route.

5

Please sign in to leave a comment.