我最近安装了mongodb,当我尝试运行它时,我收到了这个错误。任何人都可以帮我解决这个错误吗?
C:\Program Files\MongoDB\Server\3.6\bin>mongo.exe
MongoDB shell version v3.6.2
connecting to: mongodb://127.0.0.1:27017
2018-01-29T11:53:16.025+0530 I NETWORK [thread1] Socket recv() An established connection was aborted by the software in your host machine. 127.0.0.1:27017
2018-01-29T11:53:16.025+0530 I NETWORK [thread1] SocketException: remote: (NONE):0 error: SocketException socket exception [RECV_ERROR] server [127.0.0.1:27017]
2018-01-29T11:53:16.026+0530 E QUERY [thread1] Error: network error while attempting to run command 'isMaster' on host '127.0.0.1:27017' :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
答案 0 :(得分:0)
从此路径中打开mongod
C:\ Program Files \ MongoDB \ Server \ 3.6 \ bin
然后从另一个终端运行mongo
。