Configure RubyMine remote connection to Heroku PostgreSQL

我的梦境 提交于 2019-12-03 05:06:34

问题


How should I configure RubyMine jdbc datasource to remotely connect to Heroku's PostgreSQL database? Currently I am using such connection URL:

jdbc:postgresql://ec2-54-197-241-67.compute-1.amazonaws.com/dbqi9t12t5035q

but I get error about lack of entry for host '62.87.242.2' in pg_hba.conf. I am pretty sure that user and password are correct, because it runs online... :-). Could you help me?

Thank you in advance!


回答1:


In the Advanced tab, there are a bunch of properties. Set the following properties:

ssl -> true
sslfactory -> org.postgresql.ssl.NonValidatingFactory



回答2:


The error you're seeing means the security policy of the Postgres server doesn't allow the connection. Heroku Postgres only allow connections from within Heroku, as far as I know.

You'll need to use their official command line tools if you want to open a remote database connection:

heroku pg:psql

The official tools authenticate to Heroku and tunnel through their network.



来源:https://stackoverflow.com/questions/20807272/configure-rubymine-remote-connection-to-heroku-postgresql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!