mongod command not recognized when trying to connect to a mongodb server

后端 未结 14 757
暖寄归人
暖寄归人 2021-01-31 01:11

I am following the tutorials at docs.mongodb.org, I have completed the first tutorial which was to install mongodb on a windows machine. I am now at the second stage which is ge

14条回答
  •  灰色年华
    2021-01-31 01:40

    Are you sure that you have specified the correct paths?

    You need to be in the right directory, i.e.

    C:\Program Files\MongoDB\bin
    

    and the path you are installing into needs to be the correct one

    i.e.

    mongod --dbpath 
    C:\Users\Name\Documents\myWebsites\nodetest1
    

    A folder named "data" must also exist in your project folder.

    I got the same error and this worked for me.

提交回复
热议问题