码迷,mamicode.com
首页 > 数据库 > 详细

postgresql mogo数据库允许其它主机访问

时间:2017-05-14 19:39:07      阅读:285      评论:0      收藏:0      [点我收藏+]

标签:sql   str   admin   cal   color   listen   art   main   访问   

postgres:

/etc/postgresql/9.5/main/

environment  pg_ctl.conf  pg_hba.conf  pg_ident.conf  postgresql.conf  start.conf

postgresql.conf 修改:

listen_addresses = * 
#listen_addresses = localhost # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to localhost; use * for all
# (change requires restart)

pg_hba.conf修改:

# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# dy
host    all             all             172.18.1.80/32          md5
# acm
host    all             all             172.22.27.0/8           md5

 

mongo:

 修改/etc/mongod.conf

bindIp: [127.0.0.1,192.168.1.2,192.168.1.3,192.168.1.4,192.168.1.5]

postgresql mogo数据库允许其它主机访问

标签:sql   str   admin   cal   color   listen   art   main   访问   

原文地址:http://www.cnblogs.com/cdyboke/p/6853294.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!