Postgres – Network Access

After installing postgres, there is no problem to access locally, however when you access through network , this error message occurs.

could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host “10.100.206.84″ and accepting TCP/IP connections on port 5432?

This occurs because Postgres is not allowed to access in network in it’s configuration file.

You may fix this by doing these steps:
1) Go to Postgres intstallation directory’s data folder.

eg. C:\Program Files\PostgreSQL\9.0\data

2) Open the file pg_hba.conf in text editor like Notepad.

3) You will find the following line in the end of the file.
# IPv4 local connections:
host             all                  all                127.0.0.1/32           md5
# IPv6 local connections:
host            all                   all                 ::1/128 md5

add the following line under IPv4 local connections:

host             all                  all                10.100.206.84/32           md5

4) Save the file.

5) Restart Postgres services.

6) It’s Done.

Enjoy…!!
 

 

 

 

 

 

 

 

Deepak Arora

Deepak Arora is a Software Developer and working continuously in this field from 2011. He work mainly with Microsoft Technology. He holds a Master's in Computer Application and he is MCTS certified person.

2 thoughts on “Postgres – Network Access

  1. Definitely consider that which you said. Your favourite reason appeared to be at the web the easiest factor to consider of. I say to you, I definitely get annoyed at the same time as folks think about issues that they plainly don’t realize about. You controlled to hit the nail upon the highest and also outlined out the whole thing without having side effect , people can take a signal. Will likely be back to get more. Thank you|

Leave a Reply

Your email address will not be published. Required fields are marked *