Access to database denied :ELEPHANTSQL on Bluemix - “No pg_hba.conf entry for host localhost, user ADMIN, database SYSTEM” While trying to connect to my ElephantSQL database on Bluemix using pgadmin, it throws the following error.


Access to database denied
The server doesn't grant access to the database: the server reports 
FATAL: no pg_hba.conf entry for host "XX.XXX.XX.XX", user "abcd", database "postgres", SSL on FATAL: no pg_hba.conf entry for host "XX.XXX.XX.XX", user "abcd", database "postgres", SSL off

To access a database on a PostgreSQL server, you first have to grant primary access to the server for your client (Host Based Authentication). PostgreSQL will check the pg_hba.conf file if a pattern that matches your client address / username / database is present and enabled before any SQL GRANT access control lists are evaluated.



How can I access the pg_hba.conf file on bluemix?
The error message means you are already accessing pg_hba.conf. There is just no line granting access for your connection attempt. At least one of your provided details (host, user, database) does not match for any line in the file.

I am not familiar with ElephantSQL, but it seems to be a database hosting service providing standard PostgreSQL. Advice in the manual should apply. Here is a related answer with more explanation and links:


Something wrong in pg_hba.conf