本文共 314 字,大约阅读时间需要 1 分钟。
mongodb远程连接配配置,分以下4步。
1,添加管理员账
- > use admin
- switched to db admin
- > db.addUser('tank','test');
2,配置mongodb.conf
- #bind_ip = 127.0.0.1
- auth = true
3,重启mongodb
4,防火墙开放27017端口开放
- iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 27017 -j ACCEPT
转载地址:http://aqsel.baihongyu.com/