Home:ALL Converter>mongodb ignores dbPath parameter?

mongodb ignores dbPath parameter?

Ask Time:2018-09-18T23:31:45         Author:JavaSheriff

Json Formatter

I installed Mongodb latest (4.0) as a service on Windows 10
It seems like its ignoring the mongod.cfg file in the bin directory

C:\MongoDB4.0\bin\mongod.cfg
# Where and how to store data.
 storage:
     dbPath: C:\MongoDB4.0\data

The service will not start,
When I start it from CMD like:

c:\MongoDB4.0\bin>mongod.exe

This is its output: (see dbpath=c:\data\db)

Log:  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
Log:  [initandlisten] MongoDB starting : pid=7104 port=27017 dbpath=c:\data\db\ 64-bit host=Win10-Pc
Log:  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
Log:  [initandlisten] db version v4.0.2
Log:  [initandlisten] git version: fc1573ba18aee42f97a3bb13b67af7d837826b47

I see that the service gets the configuration as a parameter

C:\MongoDB4.0\bin\mongod.exe --config "C:\MongoDB4.0\bin\mongod.cfg" --service

Server Prop

Author:JavaSheriff,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/52390046/mongodb-ignores-dbpath-parameter
yy