当我尝试在Heroku上连接Postgres数据库时,出现以下错误:
psql: SSL error: certificate verify failed
FATAL: no pg_hba.conf entry for host "73.15.187.47", user "first", database "my_db", SSL off
我不知道我做错了什么。我的Heroku命令历史记录如下:
heroku login
Enter your Heroku credentials:
Email: first.last@example.com
Password: ****************
Logged in as first.last@example.com
找到版本
heroku --version
输出
heroku/7.0.22 darwin-x64 node-v10.0.0
使用CLI连接到数据库
first $ heroku pg:psql postgresql-amorphous-32821 --credential first --app my_db
--> Connecting to postgresql-amorphous-32821
psql: SSL error: certificate verify failed
FATAL: no pg_hba.conf entry for host "73.15.187.47", user "first", database "my_db", SSL off
我在MacBook上,我正在尝试登录Heroku数据库。我还尝试使用PGAdmin进行连接。我收到以下错误。
Unable to connect to server:
SSL error: certificate verify failed
Heroku Pg信息
=== HEROKU_POSTGRESQL_COPPER_URL, FIRST_URL, DATABASE_URL, HEROKU_POSTGRESQL_SILVER_URL
Plan: Premium 2
Status: Available
HA Status: Available
Data Size: 85.2 GB
Tables: 121
PG Version: 9.6.6
Connections: 175/400
Credentials: 6
Fork/Follow: Available
Rollback: earliest from 2018-04-27 01:23 UTC
Created: 2017-11-15 06:14 UTC
Region: us
Data Encryption: In Use
Continuous Protection: On
Followers: HEROKU_POSTGRESQL_ONYX
Forks: HEROKU_POSTGRESQL_PINK
Maintenance: not required
Maintenance window: Tuesdays 20:00 to Wednesdays 00:00 UTC
Add-on: postgresql-amorphous-32821
=== HEROKU_POSTGRESQL_ONYX_URL
Plan: Premium 0
Status: Available
Data Size: 85.2 GB
Tables: 121
PG Version: 9.6.6
Connections: 1/120
Credentials: 6
Fork/Follow: Unavailable on followers
Rollback: earliest from 2018-04-27 01:23 UTC
Created: 2017-11-29 23:46 UTC
Region: us
Data Encryption: In Use
Continuous Protection: On (on leader)
Following: NVD
Behind By: 24 commits
Maintenance: not required
Maintenance window: Thursdays 20:30 to Fridays 00:30 UTC
Add-on: postgresql-shaped-81300
=== HEROKU_POSTGRESQL_PINK_URL
Plan: Standard 0
Status: Available
Data Size: 96.5 GB
Tables: 121
PG Version: 9.6.7
Connections: 1/120
Connection Pooling: Available
Credentials: 5
Fork/Follow: Available
Rollback: earliest from 2018-04-30 01:23 UTC
Created: 2018-02-14 05:09 UTC
Region: us
Data Encryption: In Use
Continuous Protection: On
Forked From: NVD
Maintenance: not required
Maintenance window: Tuesdays 22:30 to Wednesdays 02:30 UTC
Add-on: postgresql-metric-29727
Heroku psql info
heroku pg:psql FIRST_URL --app my_db
--> Connecting to postgresql-amorphous-32821
psql: SSL error: certificate verify failed
FATAL: no pg_hba.conf entry for host "73.15.187.47", user "first", database "my_db", SSL off