![MongoDB 4 Quick Start Guide](https://wfqqreader-1252317822.image.myqcloud.com/cover/381/36699381/b_36699381.jpg)
上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:
![](https://epubservercos.yuewen.com/845C96/19470388008854906/epubprivate/OEBPS/Images/31cf5107-10d4-4bc5-9f38-22de2357647b.png?sign=1738896775-CF2OB9EHIqFsKvmAWR8MdSAHs3fV6DLF-0-671c0a7d69d4828c23e7e127b6bcb746)
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:
![](https://epubservercos.yuewen.com/845C96/19470388008854906/epubprivate/OEBPS/Images/35f38105-f85d-40db-8cc8-a4d52813b54c.png?sign=1738896775-tqGO0j6xyOqqPagfiAUniEumN4bqTVNb-0-c3b789b7d0483546cff1d29b353ec85a)