I'm trying to install mongodb on my window 7 machine. When trying to start it by using the mongod command I get this error. dbpath (\data\db) does not exist. I followed the steps ath the tutorial. All the folders exist C:\mongodb\log
, C:\mongodb\data and
C:\mongodb\data\db
.
In short, the problem of starting MongoDB server when running the command mongod may arise due to file permission or ownership issues.
You can start MongoDB from a command line by issuing the mongod command and specifying options. For a list of options, see the mongod reference. MongoDB can also run as a Windows service. For details, see Start MongoDB Community Edition as a Windows Service.
the MongoDB shutting down with code:100 Error Due to Incorrect File Permissions. One main reason for this error is incorrect file permissions. This problem occurred due to either a permission issue with the data files or the inability to find the desired file location.
The default path is c:\data\db. You are trying to use c:\mongodb\data\db.
This means you have to use the option --dbpath c:\mongodb\data\db for mongod command.
By default, when we start the mongodb, it looks for the folder /data/db
(on Mac/Linux) or C:\data\db
(on windows)...however, during the installation it doesn't create this folder, so when when we run mongodb for the first time, it fails with the error that it can't find C:\data\db
folder. The solution is to manually create C:\data\db
folder and then start mongodb. This error can be totally avoided if the mongodb installer can just give an option to choose this folder path and then create it as part of mongodb installation itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With