How to Allow Remote Access to PostgreSQL database

前端 未结 7 1354
鱼传尺愫
鱼传尺愫 2020-11-28 02:38

I have PostgreSQL 9.2 Installed in Windows 7 and I have windows XP installed in Virtual Machine, how do I connect these two databases and allow remote access to add/edit the

7条回答
  •  广开言路
    2020-11-28 03:34

    In addition to above answers suggesting (1) the modification of the configuration files pg_hba.conf and (2) postgresql.conf and (3) restarting the PostgreSQL service, some Windows computers might also require incoming TCP traffic to be allowed on the port (usually 5432).

    To do this, you would need to open Windows Firewall and add an inbound rule for the port (e.g. 5432).

    Head to Control Panel\System and Security\Windows Defender Firewall > Advanced Settings > Actions (right tab) > Inbound Rules > New Rule… > Port > Specific local ports and type in the port your using, usually 5432 > (defaults settings for the rest and type any name you'd like)

    Now, try connecting again from pgAdmin on the client computer. Restarting the service is not required.

提交回复
热议问题