How to Configure PostgreSQL to allow remote connection

Example:
db-srv-10 with ip 192.168.1.1
user database: default postgres

Configure:

find / -name "postgresql.conf"

/var/lib/pgsql/data/postgresql.conf

vi /var/lib/pgsql/data/postgresql.conf

listen_addresses = 'localhost'

with

listen_addresses = '*'

find / -name "pg_hba.conf"

vi /var/lib/pgsql/data/pg_hba.conf

host    all             all              192.168.1.024                       md5

Test:

 psql -h 192.168.1.10 -U postgres

Komentar

Postingan populer dari blog ini

Pembahasan IT Network Systems Administration Module A DNS (Forward Zone, Reverse Zone, CNAME, MX, Split View)

Cara restart / stop windows service (services.msc) dengan bat / cmd

How to convert VMDK to OVA