30 Kasım 2016 Çarşamba

Postgresql 9.* remote access

First find pg_hba.conf and postgresql.conf files in your terminal with

locate pg_hba.conf

and then add the following line to pg_hba.conf
 host all all 0.0.0.0/0 md5.
After this, open  postgresql.conf file and change the line
#listen_addresses='localhost'
with
listen_addresses='*'.
Finally, just restart postgresql service with
sudo service postgresql restart.
Enjoy!