MongoDB 配置 bindIp 的设置指南
一、核心概念与默认值
二、常见配置写法
net:
port: 27017
bindIp: 192.168.1.100
net:
port: 27017
bindIp: 127.0.0.1,192.168.1.100
net:
port: 27017
bindIp: 0.0.0.0,::
# /etc/hosts
192.168.1.200 solang
# mongod.conf
net:
port: 27017
bindIp: solang
net:
port: 27017
bindIp: 127.0.0.1,192.168.3.0/24
net:
port: 27017
bindIpAll: true
三、操作步骤与验证
四、安全与网络建议
security:
authorization: "enabled"
重启后使用具备权限的账号连接。