Allow remote connection to PostgreSQL

Hello,

you can connect remotely to PostgreSQL either from remote cmd of from pgAdmin by making two simple steps:

1- As a super user, open /etc/postgresql/10/main/pg_hba.conf

2- Scroll down to the line that describes local socket connections. It may look like this:

local all all peer

and add the following:

host all all 0.0.0.0/0 md5

3- In the same directory, open postgresql.conf.

Under the section on Connection Settings, add or replace the line that starts with listen_addresses to respond to all requests:

listen_addresses = '*'

4- Save and close the file.

5-Restart PostgreSQL:

sudo service postgresql restart

Posted

in

, ,

by

Comments

اترك تعليقاً

لن يتم نشر عنوان بريدك الإلكتروني. الحقول الإلزامية مشار إليها بـ *