Friday, September 26, 2014

MongoDB

I have been playing with MongoDB and come across some command that I find useful.

1. Install MongoDB as a Windows Service:

Taken from http://stackoverflow.com/questions/2438055/how-to-run-mongodb-as-windows-service
First I executed this command:
D:\mongodb\bin>mongod --remove
Then executed this one:
D:\mongodb\bin>mongod --dbpath=D:\mongodb --logpath=D:\mongodb\log.txt --install
After that right there in the command prompt execute:
services.msc
And look for MongoDB service and click start.