1

I am following this tutorial in hopes of installing/ setting up Mongodb on my mac. When attempting to run mongodb with command 'mongod' I receive the following error "shutting down with code:100". Through research I have found that this error message is thrown because mongodb cannot find the folder to store the database, but isn't that what I did with command 'sudo mkdir -p /data/db' ?

user3574939
  • 819
  • 3
  • 17
  • 34

1 Answers1

2

You need to specify the data folder, when you launch mongod. For example:

mongod --dbpath /data/db

If launching automatically, it reads from the configuration file parameter storage.dbPath.

Given that the default database path is /data/db, if mongod can't find that path, it could be a permissions issue, where the mongod process isn't the owner of the folder.

David Makogon
  • 69,407
  • 21
  • 141
  • 189