在Mongo 3.2
上安装了Windows 8.1
。得到了这个:
c:\foo>"c:\Program Files\MongoDB\Server\3.2\bin\mongo.exe"
MongoDB shell version: 3.2.5
connecting to: test
2016-04-26T13:41:31.032+0100 W NETWORK [thread1] Failed to connect to 127.0.0.1
:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2016-04-26T13:41:31.034+0100 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
c:\foo>ver
Microsoft Windows [Version 6.3.9600]
为什么?
我还能说什么?
答案 0 :(得分:2)
我得到了同样的错误,这就是我如何解决它。 打开你的任务经理 单击服务选项卡 检查Mongo Db服务 然后右键单击重启它。 希望这会解决它。
答案 1 :(得分:1)
答案 2 :(得分:0)
首先,您应该将Mongodb安装为服务,