![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=1739291212-IVPJvAiSO3KoChjPxQuIFeKT7jEQmvFa-0-3dd9f3b0cc43a407c509984fb5e002a7)
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=1739291212-jQfpJ7pFnMuprEMeCjNH2S5O32aYpLnj-0-264d0c8266175a1767e2e18442427720)