I am getting this error constantly while i am trying to install mongod using a configuration file. So, I am looking at this tutorial on Pluralsight on mongodb. The person\'s pro
echo logpath=C:/myProgra/MongoDB/log/mongo.log > "C:\MyProgram\MongoDB\mongod.cfg" C:\myprogram\MongoDB\Server\3.0\bin\mongod.exe --config "C:\myProgram\MongoDB\mongod.cfg" --install
Thanks for the suggestions guys. I just went with MongoDB's instructions on their website on installing mongod as a service in windows instead of Pluralsight tutorial's and it went well.
I got the same error
**Failed Global Initialization: BadValue logpath requires an absolute file path with windows services**
as I was specifying log path folder in mongo.config but I have to specify a log file
dbpath=C:\Program Files\MongoDB\Server\3.4\data\db
logpath=C:\Program Files\MongoDB\Server\3.4\log
diaglog=3
i changed my log file to
dbpath=C:\Program Files\MongoDB\Server\3.4\data\db
logpath=C:\Program Files\MongoDB\Server\3.4\log\mongo.log
diaglog=3
and after that this command solved my problem. hope this workfor you as well.
mongod.exe --config "C:\Program Files\MongoDB\Server\3.4\mongo.config" --install
then finally
net start MongoDB
I ran into the same problem. But I could resolve it by updating the paths as follows. I could see the problem is with Forward and backward slashes in file paths.
dbpath= C:/mongolearning/db
logpath= C:/mongolearning/mongo-server.log
verbose=vvvvv
C:\Program Files\MongoDB\Server\3.2\bin>mongod -f "C:\Program Files\MongoDB\Server\3.2\bin\mogod.conf" --install
C:\Program Files\MongoDB\Server\3.2\bin>net start mongodb
Boom it started.
The MongoDB service is starting. The MongoDB service was started successfully.