MongoError: connect ECONNREFUSED 127.0.0.1:27017

后端 未结 21 1323
我在风中等你
我在风中等你 2020-12-14 08:40

I\'m using NodeJS wih MongoDB using mongodb package. When I run mongod command it works fine and gives "waiting for connection on port 27017". So, mongod seems to

21条回答
  •  半阙折子戏
    2020-12-14 09:01

    For windows - just go to Mongodb folder (ex : C:\ProgramFiles\MongoDB\Server\3.4\bin) and open cmd in the folder and type "mongod.exe --dbpath c:\data\db"

    if c:\data\db folder doesn't exist then create it by yourself and run above command again.

    All should work fine by now.))

提交回复
热议问题