Error reading config file. MongoDB Error reading config file. MongoDB mongodb mongodb

Error reading config file. MongoDB


Please try with the apostrophes ":

mongod.exe --config "C:\Program Files\mongodb\bin\mongo.cfg"

Probably its beacuse of space in phrase "Program Files"


I realized that in my case the explorer was hidding the ".txt" extension. Once I deleted the .txt it worked perfectly. The same happened with the .cfg file


Changing to double quotes fixed the issue for me. I was trying to install mongo on Windows Server 2016.

mongod.exe --config 'C:\Program Files\MongoDB\Server\3.4\bin\mongod.cfg'

VS

mongod.exe --config "C:\Program Files\MongoDB\Server\3.4\bin\mongod.cfg"