Windows下对postgre开启远程连接权限

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

 

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

Java代码  收藏代码
  1. D:\Program Files (x86)\PostgreSQL\9.3\data  

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

Java代码  收藏代码
  1. listen_addresses = '*'  

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

Java代码  收藏代码
  1. # IPv4 local connections:  
  2. host    all             all             127.0.0.1/32            md5  
  3. host    all             all             xxx.xxx.xxx.xxx/32            md5  

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

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

 

再次尝试重新连接就OK了

posted @ 2018-04-13 17:43  黄景新  阅读(2445)  评论(0编辑  收藏  举报