Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (50.2k points)

I have installed mongodb on windows 8.1

As per the official docs, I have used the command promp to navigate to D:\mongodb\bin

then I use the following command

mongod.exe --config D:\mongodb\mongodb.conf

The content of mongodb.conf

bind_ip = 127.0.0.1,100.100.100.100

port = 3979

quiet = true

dbpath = D:\mongodb\data\db

logpath = D:\mongodb\data\log\mongodb.log

logappend = true

journal = true

But my mongod is not starting. But if I use mongod.exe (without using config file), it works fine...

1 Answer

0 votes
by (108k points)

Actually the config file must be valid YAML in MongoDB. You can try modifying the sample file provided with the documentation, for example:

net:

  bindIp: 127.0.0.1

  port: 3979

storage:

  dbPath: D:\mongodb\data\db

  journal:

    enabled: true

systemLog:

  destination: file

  path: D:\mongodb\data\log\mongodb.log

  quiet: true

  logAppend: true

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Oct 18, 2019 in Web Technology by Sammy (47.6k points)

Browse Categories

...