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

后端 未结 14 638
暖寄归人
暖寄归人 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 02:03

    For add environment variable please add \ after bin like below

    C:\Program Files\MongoDB\Server\3.2\bin\
    

    Then try below code in command prompt to run mongo server from parent folder of data folder.

    mongod -dbpath ./data
    

    For my case I am unable to run mongo from command prompt(normal mode). You should run as administrator. It also works on git bash.

提交回复
热议问题