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

后端 未结 14 624
暖寄归人
暖寄归人 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:47

    You need to run mongod first in one cmd window then open another and type mongo. Make sure you updated your Windows Path environment variable too so that you don't have to navigate to the directory you have all of the mongo binaries in to start the application. To update the Path variable:

    Go to Control Panel > System & Security > System > Advanced System Settings > Environment Variables > navigate to the Path variable hit Edit and add ;C:\mongodb to the Path (or whatever the directory name is where MongoDB is located (the semi-colon delimits each directory).

提交回复
热议问题