I am trying to connect to my Heroku PostgreSQL database, but I have the following error:
cannotEstablishConnection("FATAL: no pg_hba.conf entry for host \"37.167.93.189\", user \"clpnkpyttmdtyq\", database \"d3h6147v73mgtu\", SSL off\n")
I know that Heroku postgres databases should use an SSL connection, but I don't know how to configure the connection on my object Droplet.
This is my configuration file postgresql.json:
{
"host": "ec2-54-163-224-108.compute-1.amazonaws.com",
"user": "clpnkpyttmdtyq",
"password": "99201aa07c48e18e7bdf210937857b85bee37cd8d8cb904381b1ddff934c7a4f",
"database": "d3h6147v73mgtu",
"port": 5432
}
Maybe there is a parameter sslthat I do not know?
How to add VaporPostgresSQLProvider:
let drop = Droplet()
try drop.addProvider(VaporPostgreSQL.Provider.self)
Any ideas?
When I try to use my local postgres database, it works because it does not need an ssl connection.
source
share