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

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

    1.To begin using MongoDB, Open CMD with admin privilege and type : "C:\Program Files\MongoDB\Server\4.2\bin\mongo.exe"

    2.To create data directory(open another cmd terminal) cd C:
    md "\data\db" 3. To start your mongo DB database, type in cmd the following lines: "C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe" --dbpath="c:\data\db" (The --dbpath option points to your database directory.) [you can also do step 2 and 3 first and then step 1]

    ref:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/

提交回复
热议问题