1

I have changed nothing about my computer - I have, however, left the US for Germany for about two weeks. I can not connect to my database, while on my remote server I can. Is this some odd DNS issue? My coworker in the states can access it fine

--edit for config--

@authcomment@

# TYPE  DATABASE        USER            ADDRESS                 METHOD

@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
@remove-line-for-nolocal@local   all             all                                     @authmethodlocal@
# IPv4 local connections:
host    all             all             127.0.0.1/32            @authmethodhost@
# IPv6 local connections:
host    all             all             ::1/128                 @authmethodhost@
# Allow replication connections from localhost, by a user with the
# replication privilege.
@remove-line-for-nolocal@local   replication     all                                     @authmethodlocal@
host    replication     all             127.0.0.1/32            @authmethodhost@
host    replication     all             ::1/128                 @authmethodhost@

1 Answers1

1

pg_hba.conf controls the client IP's that can connect to a database. You have changed locations so it is telling you that the IP you now connecting from is not authorized in pg_hba.conf. Either you or someone else need to add it to pg_hba.conf or you need to say ssh to a computer that has access and connect from there.

Adrian Klaver
  • 15,886
  • 2
  • 17
  • 28
  • I think I understand - in the pg_hba.conf I have the following config (updated in the post) What would I look to change? – Christina Stebbins Dec 22 '21 at 22:15
  • That is the template `pg_hba.conf` that is used to build the actual one. You don't want to change that and even if you did it would not do anything. You need to find the `pg_hba.conf` that controls the server the server you are trying to connect to. Note you may also have to change firewall rules for the remote access. This maybe something you take up with whoever manages the database. – Adrian Klaver Dec 22 '21 at 22:28
  • Thank you again! I am back in the states and am no longer facing this issue. – Christina Stebbins Dec 29 '21 at 16:11