MongoDB

Install Mongo DB In Windows

In this article, we will learn how to install mongo db in windows. If you want to learn what ss Mongo db and difference between SQL and Mongo DB, then please read my previous blog from here.

Now, we will procced to install mongo db in our windows. Please follow below steps.

Step 1:

Please download community version (in .msi) from mongo db downloads.

Step 2:

Navigate to the folder where above file was downloaded. Right click on the file and click on Install.

Step 3:

Click next and choose complete setup type here.

Step 4:

Copy Data Directory path and click on Next. Then click on Install.

Step 5:

That’s it! You have successfully installed mongo db. To verify that navigate to the path that we have copied on above step. i.e C:\Program Files\MongoDB\Server\4.4\bin

Open Command Prompt and run this command.

"C:\Program Files\MongoDB\Server\4.4\bin\mongod.exe" --version

You can check that we have installed mongo v4.

Step 6:

To query in mongo, Please run this command.

"C:\Program Files\MongoDB\Server\4.4\bin\mongo.exe" --version

It will open a mongo shell. To retrieve a name of the database, use this command.

> show dbs

Step 7:

It is a headache that to open a mongo shell, every time we have to execute this log command. To solve this problem we can set Environment Variable.

Open Edit the system environment variable from control panel.

Click on Environment Variable button.

Now, select path from the upmost section and click on Edit.

Add a new path that we have copied in step 4 and click ok.

Now open a command prompt again and just write mongo and hit enter.

Now you are able to open a mongo shell using just a mongo command.

 

Hope you guys found something useful. Please give your valuable feedback/comments/questions about this article. Please let me know how you like and understand this article and how I could improve it.

 

Rupal Ribadiya

I am a Project Manager at Vision Infotech. I have more than 4 years of experience in the IT industry with understanding of Software Development Life Cycle (SDLC), involved in various phases like Requirements, Analysis/Design, Development and Testing in Microsoft Technology. Having experience in process of various application developments like web application in ASP.NET, C#, MVC, Web APIs, Rest API, Angular, Node, Express and React.

Recent Posts

Testing hk

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Operation

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

TETS NEW

test

3 years ago