我正在尝试在Windows Server 2012 R2计算机上设置postgres服务器。我的服务器机器IP是192.168.1.3,我试图从客户端机器192.168.1.4命中服务器我总是得到连接超时,是服务器启动和运行但我做了更改postgres配置文件,但在Vain.Please帮助我
我做了以下步骤:
更改了我的Postgresql.config,如下所示
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5432 # (change requires restart)
将pg_hba.config文件改为
# IPv4 local connections:
host all all 0.0.0.0/0 md5
host all all 192.168.1.5/32 trust
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
host all all 192.168.1.4/32 trust