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

Sha*_*anu 3 postgresql firewall azure azure-database-postgresql

在 Azure Database for PostgreSQL 服务中创建新服务器后,尝试连接到该服务器时出现以下错误。自从我在Azure门户上看到通知后,服务器已经创建完毕,也可以在Azure门户上查看服务器详细信息。

psql:致命:主机“ <ipv4 address>”、用户“cloudsa”、数据库“postgres”没有 pg_hba.conf 条目,

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

Sha*_*anu 5

在 Azure 中创建新的 postgresql 服务器后立即出现此错误的最常见原因是没有正确设置防火墙规则,因此您的应用程序/客户端无法访问新创建的服务器。详细了解Azure 中的防火墙设置,并使用门户CLI管理新创建的 postgres 服务器的防火墙规则。正确设置防火墙规则后,您应该能够连接到服务器。