gpt4 book ai didi

postgresql - 无法连接到 Heroku 上托管的 pg 数据库

转载 作者:行者123 更新时间:2023-11-29 11:35:33 25 4
gpt4 key购买 nike

当尝试连接到 PG 数据库时出现以下错误:

$ heroku pg:psql --app rf1
psql: could not connect to server: Operation timed out Is the server running on host "ec2-184-73-161-119.compute-1.amazonaws.com" and accepting TCP/IP connections on port 5432?

我该如何解决?P.s:我是在OS X环境下运行的,并且安装了本地pg。

更新:

heroku pg:info --app rf1
=== SHARED_DATABASE (DATABASE_URL)
Data Size: 312k

最佳答案

您需要运行 Heroku 的生产数据库之一或其新开发的 9.1 数据库才能从外部连接到数据库;

https://devcenter.heroku.com/articles/heroku-postgresqlhttps://postgres.heroku.com/blog/past/2012/4/26/heroku_postgres_development_plan/

关于postgresql - 无法连接到 Heroku 上托管的 pg 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11356775/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com