MongoDb shuts down with Code 100

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

You're all set now and you can run sudo mongod to start the Mongo server.

It's not working if you run only mongod

Source.


MongoDB needs a folder to store the database. Create a C:\data\db\ directory:

mkdir C:\data\db

and then start MongoDB:

C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe

Sometimes C:\data\db 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:\data\db folder and execute mongod.exeagain.

Tags:

Mongodb