[英]Cannot connect to heroku postgres database using Netbeans
I am trying to connect to a database hosted in https://postgres.heroku.com/databases using Netbeans (build-in) Services/Databases.我正在尝试使用 Netbeans(内置)服务/数据库连接到托管在https://postgres.heroku.com/databases中的数据库。 I am getting this error我收到此错误
Cannot establish a connection to jdbc:postgresql://ec2-xx-xxx-xxx-xxx.compute-1.am无法与 jdbc 建立连接:postgresql://ec2-xx-xxx-xxx-xxx.compute-1.am
I tried this with no issues: 1. Netbeans connecting to a local postgres database.我试过没有问题: 1. Netbeans 连接到本地 postgres 数据库。 2. Using PgAdmin III connecting to heroku postgres databases. 2. 使用 PgAdmin III 连接到 heroku postgres 数据库。
I tried downloading the latest postgres driver and use it in netbeans to create connection but the same error.我尝试下载最新的 postgres 驱动程序并在 netbeans 中使用它来创建连接,但出现相同的错误。
Thanks in advance!提前致谢!
在 Heroku 外部(例如本地)连接时,将其添加到 JDBC 连接 URL 的末尾:
?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.