Mongo is unable to start

后端 未结 9 944
故里飘歌
故里飘歌 2020-12-28 08:58

I\'m trying to start mongo uin windows10 by type: mongo in cmd.

I am getting this error:

C:\\Users\\Itzik>mongo
MongoDB shell versio         


        
9条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-28 09:45

    In C:\Program Files\MongoDB\ you might not have permission to create file/folder for your user. And mongo installer cannot create it because of lack of Administrative permission for your user.

    So in C:\Program Files\MongoDB:

    1. Create a folder named data
    2. Create a folder named db inside the folder data
    3. Now right click on the data folder and choose properties
    4. Click security tab and select your user there
    5. Click the Full control select box
    6. Click ok, ok, ok ...
    7. important! if you don't have the path "C:\Program Files\MongoDB\Server\3.4\bin" set in environment variable, please set it.
    8. Now go to shell and type : mongod --dbpath "C:\Program Files\MongoDB\data\db"

    That's it :)

提交回复
热议问题