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

来源:互联网 发布:画流程图软件visio 编辑:程序博客网 时间:2024/03/29 18:31

前言: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了

0 0