mongodb远程连接

1.关闭防火墙

  firewall-cmd    --state   查看防火墙是否运行中

  systemctl  stop   firewalld.service  关闭防火墙服务

2.使用bind_ip指定mongodb允许其他任何机器的访问

  ./mongod --bind_ip 0.0.0.0

防火墙相关操作参考:https://blog.csdn.net/pucao_cug/article/details/71758883

posted on 2018-06-13 14:17  代码ok  阅读(143)  评论(0编辑  收藏  举报