Skip to main content
Tweeted twitter.com/StackDBAs/status/820759143636201473

After doing some research, I edited my pg_hba.conf file: # TYPE DATABASE USER ADDRESS METHOD

    # 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
    host    all             all             173.66.143.244/24       md5 (new entry)
    host    all             all             0.0.0.0/0               md5 (new entry)
    # IPv6 local connections:
    host    all             all             ::1/128                 trust
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    #local   replication     uzrrrrd                                trust
    #host    replication     uzrrrrd        127.0.0.1/32            trust
    #host    replication     uzrrrrd        ::1/128                 trust

ThanksThank in advance!

After doing some research, I edited my pg_hba.conf file: # 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
    host    all             all             173.66.143.244/24       md5 (new entry)
    host    all             all             0.0.0.0/0               md5 (new entry)
    # IPv6 local connections:
    host    all             all             ::1/128                 trust
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    #local   replication     uzrrrrd                                trust
    #host    replication     uzrrrrd        127.0.0.1/32            trust
    #host    replication     uzrrrrd        ::1/128                 trust

Thanks!

After doing some research, I edited my pg_hba.conf file:

    # 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
    host    all             all             173.66.143.244/24       md5 (new entry)
    host    all             all             0.0.0.0/0               md5 (new entry)
    # IPv6 local connections:
    host    all             all             ::1/128                 trust
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    #local   replication     uzrrrrd                                trust
    #host    replication     uzrrrrd        127.0.0.1/32            trust
    #host    replication     uzrrrrd        ::1/128                 trust

Thank in advance!

Source Link
Kevin
  • 71
  • 1
  • 1
  • 2

pgadmin / postgresql - no pg_hba.conf entry for host

I am trying to use pgAdmin to connect to a Postgresql server hosted by Elephantsql. However, I keep getting the error no pg_hba.conf entry for host:

no pg_hba.conf entry for host "173.18.54.553", user "db_user", database "db_name", SSL on FATAL: no pg_hba.conf entry for host "xxx.xx.xxx.xxx", user "hcexhbhx", database "postgres", SSL off

After doing some research, I edited my pg_hba.conf file: # 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
    host    all             all             173.66.143.244/24       md5 (new entry)
    host    all             all             0.0.0.0/0               md5 (new entry)
    # IPv6 local connections:
    host    all             all             ::1/128                 trust
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    #local   replication     uzrrrrd                                trust
    #host    replication     uzrrrrd        127.0.0.1/32            trust
    #host    replication     uzrrrrd        ::1/128                 trust

And I added a line to my postgres.conf file:

listen_addresses='*'

And I restarted postgresql before attempting to connect again. However, I'm still getting the no pg_hba.conf entry for host error.

Does anyone know what I might be doing wrong?

Thanks!