无法连接到我在 Azure 中新创建的 postgresql 服务器

Unable to connect to my newly created postgresql server in Azure

在 Azure Database for PostgreSQL 服务中创建新服务器后,尝试连接时出现以下错误。自从我在Azure 门户上看到一个通知后就已经创建服务器了,也可以在Azure 门户上查看服务器详情

psql:严重错误:主机“<ipv4 address>”、用户 "cloudsa"、数据库 "postgres"、

没有 pg_hba.conf 条目

我是否遗漏了使我的客户端可以访问我的 postgres 服务器的任何步骤 (pgadmin/psql)?

在 Azure 中创建新的 postgresql 服务器后出现此错误的最常见原因是未正确设置防火墙规则,因此您的 app/client 可以访问新创建的服务器。阅读有关 firewall settings in Azure and use either the portal or CLI 的更多信息,以管理新创建的 postgres 服务器的防火墙规则。正确设置防火墙规则后,您应该能够连接到服务器。