...
configure database to enable networking
edit the file:
postgresql.conf
Linux:/etc/postgresql/{version}/main/postgresql.conf
MacOS:/usr/local/var/postgresql.conf
Windows:C:\Program Files\PostgreSQL\{version}\data\postgresql.conf
remove the # before the line:
listen_addresses = '*'
This allows access from all IP addresses.save the file
allow access from remote workstation
edit the file:
pg_hba.conf
Linux:/etc/postgresql/{version}/main/pg_hba.conf
MacOS:/usr/local/var/pg_hba.conf
Windows:C:\Program Files\PostgreSQL\{version}\data\pg_hba.conf
add this line to the block IPV4:
Code Block |
---|
# TheTYPE same usingDATABASE a host name (would typically cover both IPv4 and IPv6). # TYPE DATABASE USER CIDR-ADDRESS METHOD host all CIDR-ADDRESS all METHOD # IPv4 localhost trustlocal connections host all all 0.0.0.0/0 trust |
...