By default PostgreSQL is configured to be bound to localhost. Which means any attempt to connect to the PostgreSQL server from outside the machine will be refused. To make the connection possible from outside, you will need to make few changes in PostgreSQL configuration file.
You will need to set the postgres user password if you are working on a freshly installed PostgreSQL server.
On postgres=# prompt, type the following to set the postgres user password: Exit from postgres=# prompt:Configure PostgreSQL
First you will need to locate postgresql.conf file using the following command:
This will return you the absolute path of the file, edit postgresql.conf file with any of your favorite text editor: Uncomment the following lines, and add your postgresql server ip like below: Save and close the file when you are finished.
Next, locate pg_hba.conf file using the following command:
This will return you absolute path of the file, edit pg_hba.conf file with any of your favorite text editor: Add the following line at the end of the file: Save and close the file when you are finished.
Restart PostgreSQL to take changes into effect:
Now go to the pgAdmin and access your PostgreSQL database:
![](http://1.bp.blogspot.com/-NOxqpZuqfe8/X3qvQmTZKGI/AAAAAAAASzo/ZVqHqIGFh1sof06IeNcyfrbrLzQpnmc4gCLcBGAsYHQ/s16000/pgAdmin_PostgreSQL_Connection_1.png)
Enter your database server name in the Name box, then click Connection tab.
![](http://1.bp.blogspot.com/-TFijT3Snw-s/X3qvQhWkoNI/AAAAAAAASzs/A9KPtlfH4wIz4zto1XGJOCzq6ZP0NuXXwCLcBGAsYHQ/s16000/pgAdmin_PostgreSQL_Connection_2.png)
![](http://1.bp.blogspot.com/-DMy84m2sJbA/X3qvQnSOgkI/AAAAAAAASzw/XvC4V1Kpj44-ue4C9VmcnEiXnrBnaRiFwCLcBGAsYHQ/s16000/pgAdmin_PostgreSQL_Connection_3.png)