Check Postgress config file
sudo -u postgres psql -c "SHOW config_file;"
Change localhost to * for all network
sudo vim /etc/postgresql/14/main/pg_hba.conf
#listen_addresses = 'localhost'
listen_addresses = '*'
Add below line in pg_hba.conf file
sudo vim /etc/postgresql/13/main/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
host all all 0.0.0.0/0 md5
Restart postgres service
sudo systemctl restart postgresql
0 comments:
Post a Comment