Step 1: edit postgresql.conf
#mcedit /var/lib/pgsql/data/postgresql.confchange at the connections and authentication section, find the
listen_addresses = 'localhost' and change it to
listen_addresses = '*'
and uncomment
#port =5432 so it becomes
port = 5432
and save it.
Step 2: edit pg_hba.conf
Because i connecting postgresql server from my laptop which have ip number 192.168.110.131 and some times i would like connected from another 192.168.110. ip number, so i editing pg_hba.conf like this
#mcedit /var/lib/pgsql/data/pg_hba.confaddes this line to pg_hba.conf
host all all 192.168.110.0/24 md5
save it, and restart the postgresql server to look new configuration file.
From my window (using pgadmin 1.14.0) i set connection like this image bellow.
Click to enlarge |
Click to enlarge |
Done
No comments:
Post a Comment