The mongod is a primary daemon process for the MongoDB database. It handles all the background management operations, such as the data requests and managing the data format and performance. Given below are the core options performed by the mongod.
Core Options
- --help
Returns a basic help
- --version
Returns the version of the mongod domain.
- --port
Returns a TCP port for the mongod to listen, for the client connections (By default port 27017).
- --maxConns
Returns the maximum number of simultaneous connections that mongod will accept.
- --logpath
Returns all the diagnostic logging information.
- --auth
Specifies a database authentication for the users connecting from the remote hosts.
- --dbpath
Specifies a directory for the mongod instance to store its data.
If you want to shutdown the mongod instances, then you can use one of the following methods:
Shutdown mongod for Windows
- Use shutdown Server()
First you go to admin and then use the "db.shutdownServer()". Observe the following figure:
- Use CTRL-C
When running the mongod instance, in an interactive mode, use the "Control-C" to perform a clean shutdown.
Shutdown mongod for Linux
- Use --shutdown
Shut down the mongod in Linux, using the --shutdown option in the following command:
- Use kill
Shut down a specific mongod instance using the following command: