1 year ago

#382722

test-img

alanders

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' to listen_addresses = '*' in postgresql.conf file.
  • Added line host all all 0.0.0.0/0 to 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

postgresql

remote-access

pgadmin

0 Answers

Your Answer

Accepted video resources