MongoDB服务器未运行

时间:2019-03-19 09:28:27

标签: mongodb mongoose

首先mongo命令没有运行,并且我收到此错误消息:

'mongo' is not recognized as an internal or external command, operable program or batch file.

因此,我正在使用以下命令:C:\Program Files\MongoDB\Server\4.0\bin\mongo.exe,它工作正常,但是我错误地在C:/Users中而不是C:/Users/RAHUL中使用了该命令,现在我运行此命令时,它说:

MongoDB shell version v4.0.6
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
2019-03-18T19:24:31.828+0530 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: No connection could be made because the target machine actively refused it. :
connect@src/mongo/shell/mongo.js:343:13
@(connect):1:6
exception: connect failed

0 个答案:

没有答案