V
V
Vlad Gapanovich2021-03-17 00:23:32
PostgreSQL
Vlad Gapanovich, 2021-03-17 00:23:32

How to connect to a PostgreSQL DB on a remote server?

Right now the base is on a local server (PC). And there is hosting from Amazon. And right now, I don’t understand how I can connect to the database on the hosting. hosting and PC are on Windows. Preferably in stages. Picture of pg_hba file on hosting.
L4wuO.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-03-17
@Mario172

  1. Make sure PostgreSQL is listening on the external network interface.
  2. Make sure that the address of your PC is included in the subnet specified in pg_hba.conf.
  3. Make sure that the operating system firewall is not blocking connections on the port.
  4. Make sure that there is a rule in the security groups that allows connection to the port.

When all conditions are met and there is no connection, you need to pick up network diagnostic utilities and dig into all available logs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question