[documentation] To connect a client to server using postgre dbase

Having a trouble connecting your client to server workstation which uses postgre dbase?

I experienced this when I wanted to try connecting a client to server in a web based application. Here are some tips:

1. open a file named pg_hba.conf in a text editor in server workstation, placed in C:\Program Files\PostgreSQL\8.4\data

2. edit this file, and write/add the computers’ client IP addresses, for example:

# TYPE     DATABASE      USER      CIDR-ADDRESS      METHOD
#IPv4 local connections:
host       all           all       10.16.12.1/32     md5
host      all           all      10.16.12.2/32     md5

=> orange: the additional ip address client

=> black: server ip address (by default)

3. save the file, restart the postgre server,  and enjoy the connection:D

2 Comments »

  1. #puguhr said

    dont forget the firewall :)

    • Lia Rizal's personal space said

      yeah:D

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 748 other followers