无法访问远程服务器上的 MongoDB [英] cannot access MongoDB on remote server

查看:70
本文介绍了无法访问远程服务器上的 MongoDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 WINdows 服务器上安装了 MongoDB 作为服务.我正在尝试使用远程服务器的 IP 和端口 27017 从我的个人计算机访问数据库.我遵循了多个教程,但一切都失败了.下面是配置文件.

I installed MongoDB on WIndows server as a service. I am trying to access DB from my personal computer using IP of remote server and port 27017. I followed multiple tutorials but everything is failing. Below is the config file.

dbpath = C:\DB\data
logpath = C:\DB\log\mongod.log
logappend=true
port = 27017
bind_ip = 0.0.0.0
auth = true

我已在防火墙中允许端口 27017.

I have allowed port 27017 in firewall.

推荐答案

我已经解决了这个问题.一切都设置正确.我只需要在亚马逊实例上也允许端口 27017.

I have figured out the issue. Everything was setup correctly. I just needed to allow port 27017 on amazon instance too.

这篇关于无法访问远程服务器上的 MongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆