简体   繁体   English

是否可以将Mongodb同时绑定到本地和远程主机?

[英]Is it possible to bind Mongodb to local and remote host simultaneously?

Since I've changed bind_ip of mongodb in /etc/mongod.conf to my valid IP, I can not connect to mongodb locally. 由于我已将/etc/mongod.conf中的mongodb的/etc/mongod.conf为我的有效IP,因此无法在本地连接到mongodb。 is it possible to connect using both IPs? 是否可以使用两个IP进行连接? currently if I activate both of these, the second one will be activated: 当前,如果我同时激活这两个,则第二个将被激活:

bind_ip=127.0.0.1
bind_ip=111.111.111.111

bind_ip采用逗号分隔的值列表,因此将它们组合为以下项的单个条目:

bind_ip = 127.0.0.1,111.111.111.111

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM