How to install mongodb on windows 7 ?
Step 1: Download the MongoDB for windows 7
Download MongoDB windows binary files from here,
For windows 7,
Step 2: Extract the folder.
Extract the above downloaded zip file to mongodb folder in C drive.
Step 3: Create the folder data\db inside mongodb in C drive.
So your mongodb folder in c drive contains basically two folders,
- bin folder
2. data folder inside that you need to create one more folder named db (data\db)
inside bin folder,
inside data folder,
Note: above db folder is empty and ensure it has access.
Step 4: Start the MongoDB engine using mongod command
Open the command prompt/terminal and Go to this folder from command prompt,
Now run the MongoDB engine,
mongod –dbpath c:\mongodb\data\db
Step 5: Start working with MongoDB
Open one more command prompt and start working with MongoDB. (do not close the command prompt opened in the step 4).
How to confirm whether it is working properly or not ?
You can check with any mongodb command, here i just checked with it using
If you are getting the below error in step 4, then check the articles attached after this error to resolve it.
2016-12-20T00:57:50.275+0530 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
MongoDB shell version: 3.2.11-36-g1ab8780
connecting to: test
2016-12-20T00:57:55.340+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1
:27017 after 5000ms milliseconds, giving up.
2016-12-20T00:57:55.340+0530 E QUERY [thread1] Error: couldn’t connect to ser
ver 127.0.0.1:27017, connection attempt failed :
1,833 total views, 4 views today