首页 > 数据库技术 > 详细

postgresql开启网络连接

时间:2018-11-02 18:48:34      阅读:283      评论:0      收藏:0      [点我收藏+]

默认情况下,postgresql是只允许localhost连接的,如果需要使用远程连接,需要修改两个配置文件。

postgresql.conf 和 pg_hba.conf

在postgresql.conf找到 #listen_addresses = ‘localhost‘ ,取消前面的注释符号#,并且将localhost改为*

在pg_hba.conf里添加一行:

host    all              all             192.168.1.0/24        md5

ip地址按需修改

 

postgresql开启网络连接

原文:https://www.cnblogs.com/sherlock-merlin/p/9897571.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!