开启postgre远程连接权限

前言:Windows下对postgre开启远程连接权限,下面是实际操作过程中的手顺

1.找到postgresql.conf文件,注意安装路径

D:\Program Files (x86)\PostgreSQL\9.3\data

2.打开该文件,注意以下内容,确认为下面内容后,进行下一步

listen_addresses = '*'

3.打开pg_hba.conf文件,注意以下内容

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
host    all             all             xxx.xxx.xxx.xxx/32            md5

 xxx.xxx.xxx.xxx即为需要登录的IP地址

4.在Windows的服务中重新启动postgre服务

再次尝试重新连接就OK了

猜你喜欢

转载自qing-gee.iteye.com/blog/2119107