pg_hba.conf entry for host user database ssl off code example

Example 1: no pg_hba.conf entry for host user database ssl off

Add or edit the following line in your postgresql.conf :

listen_addresses = '*'
Add the following line as the first line of pg_hba.conf. It allows access to all databases for all users with an encrypted password:

# TYPE DATABASE USER CIDR-ADDRESS  METHOD
host  all  all 0.0.0.0/0 md5
Restart Postgresql after adding this with service postgresql restart or the equivalent command for your setup.

Example 2: no pg_hba.conf entry for host SSL off

listen_addresses = '*'
/etc/init.d/postgresql restart

Tags:

Misc Example