How to change the MongoDB configuration file location in Windows?

mongodb
windows
(Dmitry Fedyuk) #1

The MongoDB service’s launching command path is stored in Windows Registry at the following path:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MongoDB\ImagePath

04

The configuration path is set as the --config argument of the launching command, e.g.:

C:\server\mongodb\bin\mongod.exe --config "C:\server\mongodb\cfg\mongod.cfg" --service

05

Set the proper value there, and then restart the service.

stackoverflow.com/a/7190551

0 Likes

Where is the MongoDB configuration file located in Windows?