heroku pg:psql不起作用

Lon*_*Wan 5 heroku

我试图通过运行命令“ heroku pg:psql”连接到我在heroku上的应用程序的Postgres数据库,并收到以下错误消息:

psql: could not connect to server: Connection timed out (0x0000274C/10060)
    Is the server running on host "URL.com"(IP address)  and accepting
    TCP/IP connections on port 5432?
Run Code Online (Sandbox Code Playgroud)

我也尝试使用Pgadmin连接并得到错误:

Server doesn't listen. Is the server running on host "URL.com" (IP address) and accepting
    TCP/IP connections on port 5432?
Run Code Online (Sandbox Code Playgroud)

谁能告诉我如何解决这些错误并正确连接到我的数据库。提前致谢!

Yon*_*tch 2

尝试这个:

heroku pg:psql DATABASE_URL
Run Code Online (Sandbox Code Playgroud)