Friday, December 16, 2016

Run MongoDB as Windows service

In the previous POST we had shown How to install MongoDB in Windows

Now in this post I will show how to ADD MongoDB as Service in windows

Continuing the previous post...

GO to C:\MongoDB,  press "Shift Key and Right Click on Bin Folder",
Select Open command window here in the context menu and use the command as shown below.

mongod --dbpath=C:\mongodb --logpath=C:\mongodb\log.txt --install

the total command looks as shown below

C:\MongoDB\bin\mongod --dbpath=C:\mongodb --logpath=C:\mongodb\log.txt --install

Now goto Services, select MongoDB and Start the Service as shown above.

No comments:

Post a Comment