I am trying to connect to a database hosted in https://postgres.heroku.com/databases using Netbeans (build-in) Services/Databases. I am getting this error
Cannot establish a connection to jdbc:postgresql://ec2-xx-xxx-xxx-xxx.compute-1.am
I tried this with no issues: 1. Netbeans connecting to a local postgres database. 2. Using PgAdmin III connecting to heroku postgres databases.
I tried downloading the latest postgres driver and use it in netbeans to create connection but the same error.
Thanks in advance!
When connecting outside of Heroku (e.g. locally), add this to the end of your JDBC connection URL:
?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With