Connect to PostgreSQL over a network

I have a pgsql server running on Windows 7. I can remotely connect to it on the network using the computer name, so I know there are no configuration problems, etc. I turned off the firewall. I have a static ip and tried to connect to the database from another network, but I get an error: the server is not listening. What am I doing wrong? I know small amounts about ip addresses, so any help would be appreciated. thanks in advance!

EDIT: A little more information, I set up a home network, I have two computers connected to a network that can simultaneously access the pgsql server, which is located on one of the computers. I am based in uk and get my internet from plusnet, config everything is done on the thompson gateway. The third computer is a remote computer not on the same network, I just tested if I could "host" the pgsql database for several, not network computers. His most hobby is indeed, although it would be if I could do it for work reasons too. Thanks for the help. (sorry if I feel stupid, but really this is not my topic!)

+3
source share
1 answer

Configure pg_hba.conf to add a line

host all all 192.168.0.1/24 trust

IP 192.168.0.1 , IP- postgresql.conf, .

tcpip_socket = true 

, ^^ ,

listen_addresses = '*'

localhost, *, , IP-

+6

Source: https://habr.com/ru/post/1786255/


All Articles