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
1 | etc /postgresql/10/main/pg_hba .conf |
2- Scroll down to the line that describes local socket connections. It may look like this:
1 | local all all peer |
and add the following:
1 | 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:
1 | listen_addresses = '*' |
4- Save and close the file.
5-Restart PostgreSQL:
1 | sudo service postgresql restart |
اترك تعليقاً