MongoDB 4 Quick Start Guide
上QQ阅读APP看书,第一时间看更新

MongoDB Windows file locations

If using the Windows MSI installer (recommended), the MongoDB program files will be stored here:

C:\Program Files\MongoDB\Server\<version>

You have the option, during the installation process, of specifying the location where the database and log files are stored. Once finished, here is a look at the new directory structure:

If you elected to install MongoDB as a service, it starts automatically, and can be administered just as any Windows service.

The configuration file, which contains the locations of the database and log files, defaults to:

C:\Program Files\MongoDB\Server\4.0\bin\mongod.cfg

This file is automatically generated by the installer. By default, here are its contents: