MongoDB: How to repair MongoDB using Command Prompt on unexpected system shutdown.

First of all lets take a look about MongoDB database. MongoDB is a lightweight and document-oriented language which is built on C++. In this, data are stored in JSON form.

MongoDB can be used in many languages to store data. Among the various languages, there is a good server side language Node.Js in which MongoDB are used.

Now lets move on the issue which occurs on unexpected system shutdown.

I am writing a command and you have to run it using command prompt.

1)  Open Command Prompt by typing “cmd” on “run” and type cd/ to go to the root directory.

2)  Now create a folder “data” in C: directory.

3)  Now type below command in “cmd”

 “Program Files\MongoDB\Server\3.0\bin\mongod.exe” –dbpath C:\data –repair


4)  Now click “enter” button and above query will execute and fixed the errors.

Happy coding………..


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s