Where is MongoDB config file on Windows?
Category:
technology and computing
data storage and warehousing
Configuration File
- On Linux, a default /etc/mongod. conf configuration file is included when using a package manager to install MongoDB.
- On Windows, a default <install directory>/bin/mongod. cfg configuration file is included during the installation.
- On macOS, a default /usr/local/etc/mongod.
Similarly one may ask, how create MongoDB config file in Windows?
Configure a Windows Service for MongoDB
- On the machine on which you installed MongoDB Community Edition, select the Windows Start button, then navigate to and right-click Command Prompt, and then select Run as administrator.
- On the command prompt window, enter the following:
- Create a configuration (.cfg) file.
- To check mongodb version use the mongod command with --version option.
- On windows you will have to use full path to the mongod.exe and mongo.exe to check mongodb version, if you have not set MongoDB Path.
- But if MongoDb Path is being set, you can simply use the mongod and mongo command.
Also to know is, where is MongoDB stored Windows?
By default Mongo stores its data in the directory /data/db . You can specify a different directory using the --dbpath option. If you're running Mongo on Windows then the directory will be C:datadb , where C is the drive letter of the working directory in which Mongo was started.
Installing and Running MongoDB on a Windows Machine
- Download the MongoDB installer file from the downloads section of the MongoDB website.
- Find the dowloaded .
- Create the directory where MongoDB will store it's files.
- Start the mongodb daemon by running C:mongodbinmongod.exe in the Command Prompt.