I followed the MongoDb Docs to setup my first MongoDb,
When I start MongoDB using the command
C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe I get the following error 
Additionally, if you have installed MongoDB using a package manager for Ubuntu or Debian then you can stop mongodb (currently mongod in ubuntu) as follows: Upstart: sudo service mongod stop. Sysvinit: sudo /etc/init. d/mongod stop.
The main purpose of mongod is to manage all the MongoDB server tasks. For instance, accepting requests, responding to client, and memory management. mongo is a command line shell that can interact with the client (for example, system administrators and developers).
shutdown or db. shutdownServer() command was run, mongod only continues the shut down steps if the force field is true, or a. SIGTERM signal was sent to mongod , mongod always continues the shut down steps.
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.
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