2

I'm using Azure Database for PostgreSQL flexible server in my azure account. I'm not able to connect to this server from azure data studio, getting the below error...I have already installed the Postgres extension in the azure studio. Thanks in advance.

could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "https://test-postgres.postgres.database.azure.com" (x.x.x.x) and accepting TCP/IP connections on port 5432?

Vidar
  • 6,548
  • 22
  • 66
  • 96
Chaitali
  • 87
  • 13

2 Answers2

0

This is more than likely to do with your company's firewall blocking port 5432.

Vidar
  • 6,548
  • 22
  • 66
  • 96
0

Flexible server can be stopped and started on demand. Ensure the database is running from the Azure Portal.

Also check the firewall settings for the database in the portal. By default databases will have all IP addresses blocked for connections. Add the public IP of the computer you are connecting Data Studio from.

If it is running, and firewall is open, it is likely a network firewall issue. You can test this by connecting to the database through your bash prompt in Azure Portal, or by connecting to an Azure VM to test with.

Hans
  • 31
  • 4