How to Install and Setup MongoDB on Windows 11

By Aditya Dhanraj Add a Comment 4 Min Read
How-to-Install-and-Setup-MongoDB-on-Windows-11

MongoDB is a cross-platform document-oriented database program, and it is classified as a NoSQL database program. It was initially released on 11 February 2009 by MongoDB Inc. Here we will discuss how to install and setup MongoDB on Windows 11.

First of all, let us download MongoDB. To download it visit mongodb.com and click on Products. Now download the MongoDB Community Server edition. Or else, you can directly click this link to download MongoDB for the Windows operating system.

How to Install MongoDB on Windows 11

Once the download is complete, follow the steps mentioned below; to install MongoDB on Windows 11. If you are using Windows 7 or Windows 8.1, then also the steps are the same.

1. Open the MongoDB installer file and click Next to continue the installation process.

2. After that, accept the end-user license agreement.

3. Then click on the Next button to continue.

4. On the next window, choose the setup type as Complete and keep everything to default.

5. Now confirm the service you want to install. Choose Install MongoD as a Service and Run service as Network Service user from the available choices.

6. Then give your service a name. Its default name is MongoDB. To proceed, press the Next button.

7. On the next window, check the box to install MongoDB Compass and click on Next to continue.

8. Then click the Install button to install MongoDB on Windows 11.

9. After the installation is complete, it will open the MongoDB compass program.

10. Click on the Start button. Now it will ask you to create a new connection. Before that, you need to set up the MongoDB environment variable. For that, follow the below steps.

How to Setup MongoDB on Windows 11

To use MongoDB, we have to set the environment path variable. For that, copy the path of the MongoDB bin folder. Usually, you will get it on your C Drive > Program Files and look for the MongoDB folder and you will get the bin folder inside the MongoDB folder. 

After that, follow the following steps:

1. Open the MongoDB bin folder and copy the path.

2. Open Settings and click on the System tab from the left panel.

3. Then, look for an option called About and click on that option present to the right of your screen.

4. Now, you’ll get all your device specifications. Click on the Advanced system settings option; to access the System Properties.

5. It will open the system properties window. Here click on the Advanced tab and select Environment Variables to open the environment variables windows.

6. Here you will get two variable options. One is for user variables and the other is for system variables.

7. Under the system variable section, select the Path variable and click on the Edit button.

8. Now click on New and add the MongoDB installation location.

9. After that, click on OK to save the changes.

10. Now open the MongoDB Compass and click on the New Connection button.

11. On the URL box enter “Mongodb://localhost:27017” and then click on the Connect button.

Now, you are ready to use MongoDB. If you want, you can also use MongoDB shell or else you can use the GUI of MongoDB Compass to manage your database.

TAGGED:
Follow:
Aditya Dhanraj is a Web Developer by profession and Content Writer by passion. He loves to write about coding and programming. When he is not writing, he must be developing something!
Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *