Jordan Mong
Jordan Mong

Reputation: 53

How can i connect Azure postgres database to pgadmin as im getting time out error

I have created a database in Azure database in postgreSQL but when i try connect through pgadmin it says unable to connect timeout expired(I'm pretty sure admin and password are correct). Is anyone facing this issue? is there an alternative for pgadmin ?

enter image description here

Upvotes: 3

Views: 11246

Answers (6)

nor0x
nor0x

Reputation: 1213

you may need to add you client ip as a firewall rule.

enter image description here

Upvotes: 0

scott_lotus
scott_lotus

Reputation: 3275

Strange one:

  • Azure My SQL flexible server v14.12
  • PG ADMIN 4 v8.9
  • Windows 11 client PC

Could connect in past ok with saved credentials, but was unable to connect on the day.

Checked:

  • Connection string was correct (verified by colleagues with successful connections)
  • App Server deployment used same connection string and was operational
  • My correct IP address was in the white list
  • Check my external IP on router wan interface and with external sites, 100% sure its correct
  • telnet IP: port failing (used to test response on TCP endpoint handshakes)
  • turn off windows clint firewall ensure outbound path not blocked

Resolution

  • From My SQL flexible server, remove my IP address from networking / firewall rules / white list and added again resolved the issue.

I am 100% sure the IP was correct, I have screenshots before and after confirming. Can only assume there was some sort of whitelist corruption issue and a delete/enter/save resolved.

Hope this helps someone.

Scott

Upvotes: 0

Cloghead
Cloghead

Reputation: 29

I got the timeout all of a sudden, and only after some time I realized it was the VPN that probably blocked a port or so. Once I disabled VPN it worked again. Just something to keep in mind.

Upvotes: -1

Chris Claude
Chris Claude

Reputation: 1382

pgadmin works perfectly against Azure database for Postgres. Here's the link to the docs.

  • Add your local IP to your firewall in Azure
  • In the Azure portal, navigate to connection strings to get your db credentials
  • Use the user@server format for your username
  • Use server.postgres.database.azure.com as your hostname
  • Maintenance database should be set to postgres
  • Ensure that SSL Mode is set to require under the SSL tab

That is what worked for me.

Upvotes: 2

PAA
PAA

Reputation: 12015

Below settings works for me, you can use below

enter image description here

enter image description here

Upvotes: 0

Derek Gusoff
Derek Gusoff

Reputation: 871

pgadmin works fine against Azure Postgres. A couple things to check:

  • Make sure you have a firewall exception in Azure for your local IP address.
  • Use the user@server format for your username
  • Use server.postgres.database.azure.comas your hostname
  • Make sure to set SSL Mode to require in the SSL tab

Good luck!

Upvotes: 5

Related Questions