Configuring MongoDB on Windows

后端 未结 6 869
耶瑟儿~
耶瑟儿~ 2021-02-08 10:49

I am trying to set up MongoDB on Windows, and the online docs seem far from accurate.

Under \"Configure a Windows Service\" part, step 1 mentions to create a config file

6条回答
  •  半阙折子戏
    2021-02-08 11:14

    Here is my simple test MongoDB Config file for Windows. Note that I had to have 2 spaces before each property, e.g., path. When I had 3 spaces I got an error at startup.

    I start the server with: mongod --config c:\tools\mongodb\db\mongod.cfg

    systemLog:
      destination: file
      path: "C:\\tools\\mongodb\\db\\log\\mongo.log"
      logAppend: true
    storage:
      dbPath: "C:\\tools\\mongodb\\db\\data"
    security:
      authorization: enabled
    

提交回复
热议问题