I'm trying to connect to my RDS database via rails console but seem to be hitting the following issue:
/gems/pg-0.20.0/lib/pg.rb:56:in `initialize': FATAL: no pg_hba.conf entry for host "94.xx.xxx.xx", user "DATABASE_NAME", database USERNAME, SSL off (PG::ConnectionBad)
I've come across a handful of similar questions surrounding this such as:
- connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host
- Rake aborted after FATAL no pg_hba.conf entry
- no pg_hba.conf entry for host
My pg_hba.conf
currently looks like:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
local all all md5
hostnossl all all 0.0.0.0/0 trust
host <DB_NAME> <USERNAME> 94.XXX.XXX.XXX/32 trust
I've tried also tried adding the following line to my pg_hba.conf
stopped and started the postgres service and still i'm still running into the same issue.
hostnossl all all 0.0.0.0/0 trust
I also have the following in my postgresql.conf
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '*'
I've ran out of ideas on what I could be missing