简体   繁体   中英

How to connect to Cloud SQL from pgAdmin4?

I have an instance of PostgreSQL 11 in GCP as Cloud SQL. I want to connect pgAdmin to the server but I don't know to what port. Where can I see that?

I don't want to specify my ip adress for the server and I whitelisted all the connections to the server by putting 0.0.0.0/0 as an ip in the gcp console.

Multiple methods can be used to connect Cloud SQL to external applications such as pgAdmin. Here is the documentation covering all the methods and the steps to follow. Since you do not wish to specify your ip address, then using the proxy might be a good alternative. Documentation guidelines for that method can be found here , but here is a quick summary:

  1. Enable the API
  2. Install the proxy client on your local machine
  3. Determine how you will authenticate the proxy
  4. If required by your authentication method, create a service account
  5. Determine how you will specify your instances for the proxy
  6. Start the proxy
  7. Update your application to connect to Cloud SQL using the proxy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM