'Connecting remotely to postgreSQL database
I'm trying to connect remotely on pgAdmin to a database hosted on a Windows 10 PC on another network from my personal PC.
Steps taken:
- Changed
listen_addresses = 'localhost'tolisten_addresses = '*'in postgresql.conf file. - Added line
host all all 0.0.0.0/0to pg_hba.conf file. - Restarted postgresql service.
- Opened port in firewall for port 5432
Tried to connect to database via pgAdmin on my PC by entering:
- Host name: IPv4 address of machine database is hosted on.
- Port:5432, Database: postgres, user: postgres, password: password
I can't see any error except a connection timed out error every time, but I don't know why. I've increased the connection timeout duration but still no connection. PostgreSQL service is running and I can connect to the database via pgAdmin just fine on the hosting PC.
Can anyone let me know if I'm skipping a step or anything else I need to add to the config files? Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
