How To Install And Run Mongo DB On Windows Environment

First of all you have to install the mongo if you are not installed on your personal computer. Just follow this link CLICK HERE and download the latest mongo database according to your system requirenment then after you have to follow the below steps to start your mongo database -

 Steps : 

1--After successfully installation of mongoDb go to the root of the directory and create a folder with name "data" and into the "data" folder create another folder with the name of  "db". 
Suppose you installed mongo db in C directory then go to the cd directory and create both of above mentioned folder. 

2-- Open the command prompt and go to the directory where the mongo you are installed.

3-- Next go into the bin directory.

4-- Now type the command "mongod" and press enter.

5-- Suppose you installed mongo in C directory. Then write the below command

C:\mongoDB\bin\mongod

6-- Now your mongo database is successfully running. Note don't close this command prompt otherwise your mongo db will be stopped.


7-- To check that your mongo db is running or not open another command prompt window and go into the bin directory then run below command- "mongo"


C:\mongoDB\bin\mongo

8-- To view all the database run below command

C:\mongoDB\bin\show dbs

9-- This command will be listed all the database.


Chears :)
Happy Coding

Post a Comment

Previous Post Next Post