小编ale*_*729的帖子

服务器在连接到 Azure Postgres 时意外关闭连接

我正在尝试使用本地机器上的 psql 连接到 Azure Postgresql 并收到以下错误:

$ psql "host=username.postgres.database.azure.com port=5432 dbname=postgres user=username@domain password=mypassword sslmode=require"
psql: error: could not connect to server: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
Run Code Online (Sandbox Code Playgroud)

本地 Postgres 版本:12.1,Azure Postgres 数据库版本:10,macOS Majove。

这个问题是在我使用 Homebrew 重新安装 Postgres 后才开始的。我运行没有问题$ psql --host=localhost。

我尝试postgresql@10使用自制软件进行安装,以便在运行时psql收到消息psql (12.1, server 10.11)。但是当我尝试登录 Azure Postgres 时,我遇到了与上面相同的错误。

我对 Postgres 和 Azure 还很陌生,希望得到任何建议。

更新:

感谢您的评论和反馈。

我使用 Homebrew 正确安装了 Postgres 10 并将其链接以解决问题。 …

postgresql azure azure-sql-database

7
推荐指数
1
解决办法
4458
查看次数

标签 统计

azure ×1

azure-sql-database ×1

postgresql ×1