I'm trying to connect postgreSQL instance in cloud SQL to my pgAdmin. And I'm totally confused. How can i do that?
Connect pgAdmin4 to cloud SQL
Asked Answered
When you are creating your postgres instance you have to allow access to the ip address from the postgres' client is running.
- Create your postgresql instance
- In the Create a PostgreSQL instance window give the instance id and password to you postgres user in the “Default user password” section.
- Click on “Show configuration options” and locate “Set connectivity”, there You have to give access to Your pc ip address in the “Authorized networks” under “Public IP” section click on “Add network” introduce the ip into the “Network” box and click “done”, You can check the client ip address in the link.
- If you are done with the configurations click create.
Now to verify the connectivity from the client to Cloud SQL instance I recommend you to do it the first time with the command line console.
- In you pc launch the command line console,
- execute :
psql -h [postgres instance ip address] -u postgres
. You can follow the official documentation for “Connecting psql Client Using Public IP” in the link.
© 2022 - 2024 — McMap. All rights reserved.