0

I have a PostgresSQL DB in a private subnet in a VPC. I want to do DML operations from my local environment. I installed Google SDK in order to create a VPN connection to the private instance. And run the command:

C:\Program Files (x86)\Google\Cloud SDK>gcloud sql instances describe dt-prod
backendType: SECOND_GEN
connectionName: <my_instance_connection_name>
createTime: '2022-12-26T11:27:51.767Z'
databaseInstalledVersion: POSTGRES_14_4
databaseVersion: POSTGRES_14 etc...

It seems to get all the information from DB in the Private subnet.

C:\Program Files (x86)\Google\Cloud SDK>cloud_sql_proxy -instances=<my_instance_connection_name>=tcp:5432
2023/02/01 17:58:03 Listening on 0.0.0.0:5432 for <my_instance_connection_name>
2023/02/01 17:58:03 Ready for new connections
2023/02/01 17:58:03 Generated RSA key in 745.856ms

says the command prompt.

I try to connect DB from third party applications like DBeaver. What did I do wrong? How can I connect to this DB via DBeaver? Any opinions appreciated.

Guoran Yun
  • 319
  • 2
  • 14

0 Answers0