我正在尝试使用heroku pg:psql命令在我的heroku postgres数据库中查看行并运行查询,但我总是收到此错误

问题描述 投票:0回答:1

我正在尝试使用heroku pg:psql命令在我的heroku postgres数据库中查看行并运行查询,但我总是收到此错误:-->连接到postgresql-tapered-69603 psql:错误:连接到“ec2-52-45-168-55.compute-1.amazonaws.com”(52.45.168.55)的服务器,端口 5432 失败:致命:启动数据包中未指定 PostgreSQL 用户名 与“ec2-52-45-168-55.compute-1.amazonaws.com”(52.45.168.55) 处的服务器的连接,端口 5432 失败:致命:启动数据包中未指定 PostgreSQL 用户名 ▸ psql 退出,代码为 2

我尝试在 iterm 中使用以下命令,但总是收到错误:heroku pg:psql、heroku pg:psql DATABASE_URL

heroku heroku-postgres heroku-cli
1个回答
0
投票

如果您使用的是 macOS 并使用 Homebrew 安装了

psql
命令,则升级
postgresql
软件包可能会解决该问题。我在
postgresql@14
并运行下面的命令做到了:

$ brew update
$ brew upgrade postgresql@14
© www.soinside.com 2019 - 2024. All rights reserved.