Release postgresql for Remote Access

robsonwr

Member
Jun 21, 2005
16
0
151
Piracicaba - BR
cPanel Access Level
DataCenter Provider
Good morning friends

in mysql to release for remote access put%

postgresql and how?

postgresql version 8.1 standard cpanel
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello,

You can allow remote access for a set IP for postgresql by editing /var/lib/pgsql/data/postgresql.conf file for the following two lines:

Code:
#listen_addresses = 'localhost'
#port = 5432
Uncomment both lines and then revise the localhost one to listen on another remote IP as well:

Code:
#listen_addresses = 'localhost,IP#'
After that, save the file. Then add the following like to the bottom of /var/lib/pgsql/data/pg_hba.conf file:

Code:
host all all 0.0.0.0 0.0.0.0 md5
After that, restart postgresql in WHM or using "/scripts/restartsrv_postgres" without the quotes in root SSH.

Thanks!