如何在Windows中连接到MongoDB? [英] How to connect to MongoDB in Windows?

查看:262
本文介绍了如何在Windows中连接到MongoDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从命令行运行Mongo: 怎么了? (我在localhost:80上有IIS).和8080端口上的Apache.是否有任何问题 有了这个?

I'm trying to run Mongo from the Command-Line: What's wrong? (I've IIS on localhost:80). And Apache on port 8080. Are there any issues with this?

C:\MONGO\Project1\mongo\bin>mongo --port 27017
MongoDB shell version: 2.0.3
connecting to: 127.0.0.1:27017/test
Sat Mar 10 16:16:45 Error: couldn't connect to server 127.0.0.1:27017 shell/mong
o.js:86
exception: connect failed

推荐答案

您是否创建了默认的数据库路径?
默认为"/data/db目录(在Windows上为c:\data\db")
来源: http://www.mongodb.org/display/DOCS/Starting +和+停止+ Mongo

Did you create the default db path?
It defaults to "/data/db directory (or c:\data\db on Windows)"
Source: http://www.mongodb.org/display/DOCS/Starting+and+Stopping+Mongo

这篇关于如何在Windows中连接到MongoDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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