搜索
您的当前位置:首页正文

远程连接mongodb端口不通怎么解决?

来源:二三四教育网

远程连接mongodb端口不通问题:

远程连接mongodb时,配置了防火墙规则,但是27017端口就是连接不上。

查看了mongodb的配置文件(centos中默认安装,配置文件是/ect/mongod.conf)。其中net节点下bindIp,有如下这注释:

lesten to local interface only,comment to listen on all interface。

解决方法:

将bindIP配置项,注释掉。重启mongodb服务即可:

Top