MongoDb shuts down with Code 100

MongoDb shuts down with Code 100

MongoDB needs a folder to store the database. Create a C:datadb directory:

mkdir C:datadb

and then start MongoDB:

C:Program FilesMongoDBServer3.4binmongod.exe

Sometimes C:datadb folder already exists due to previous installation. So if for this reason mongod.exe does not work, you may delete all the contents from C:datadb folder and execute mongod.exeagain.

For macOS users to fix this issue:

You need to go through the following steps:

Create the “db” directory. This is where the Mongo data files will live. You can create the directory in the default location by running:

sudo mkdir -p /data/db

Make sure that the /data/db directory has the right permissions by running:

sudo chown -R `id -un` /data/db

Youre all set now and you can run sudo mongod to start the Mongo server.

Its not working if you run only mongod

Source.

MongoDb shuts down with Code 100

Same issue on my Mac (using Brew) solved using:

sudo mongod  

Leave a Reply

Your email address will not be published.