简体   繁体   English

Heroku 维护后无法连接到 Heroku Postgres DB

[英]Can't Connect to Heroku Postgres DB After Heroku Maintenance

I've been using Heroku's Postgres databases for years now, and connecting from my MAMP localhost on Mac with no issue.我多年来一直在使用 Heroku 的 Postgres 数据库,并且在 Mac 上从我的 MAMP 本地主机连接没有问题。

However, my databases have recently been upgraded by Heroku maintenance, and now when using MAMP localhost I am getting the following PHP PDO error:但是,我的数据库最近通过 Heroku 维护进行了升级,现在使用 MAMP localhost 时出现以下 PHP PDO 错误:

"SQLSTATE[08006] [7] SSL error: tlsv1 alert protocol version" “SQLSTATE[08006] [7] SSL 错误:tlsv1 警报协议版本”

From what I understand, this is because Heroku now requires TLS version 1.2 or higher to connect to Postgres.据我了解,这是因为 Heroku 现在需要 TLS 版本 1.2 或更高版本才能连接到 Postgres。 I have verified I am using TLS 1.3 locally, but I am still getting this error.我已验证我在本地使用 TLS 1.3,但我仍然收到此错误。

How can I locally connect to my remote Heroku Postgres database from my Mac running PHP?如何从运行 PHP 的 Mac 本地连接到我的远程 Heroku Postgres 数据库?

I have been researching this issue extensively and have been unable to unblock myself.我一直在广泛研究这个问题,但一直无法解封。

Thanks in advance to anybody who can help.在此先感谢任何可以提供帮助的人。

Solution I ended up going with for anyone else in this situation.在这种情况下,我最终选择了其他任何人的解决方案。 I ended up updating the version of MAMP I was running on my Mac from MAMP 5 to MAMP 6, which included the proper versions of OpenSSL and libpq.我最终将我在 Mac 上运行的 MAMP 版本从 MAMP 5 更新到 MAMP 6,其中包括 OpenSSL 和 libpq 的正确版本。 I can once again connect to the updated remote Postgres database on Heroku. Thank you to user Ph00 Bar in the Postgres Slack group!我可以再次连接到 Heroku 上更新的远程 Postgres 数据库。感谢 Postgres Slack 组中的用户 Ph00 Bar!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM