MongoDB

How to Install MongoDB Community Edition 6.0.5 on Windows?

MongoDB is a NoSQL database utilized to store huge amounts of data in the form of documents. It has a free Community edition that is supported by plenty of popular Operating Systems, such as Windows and Solaris. The 6.0.5 edition is the current latest version of MongoDB Community that can be installed on Windows.

This article will illustrate the procedure guide to install the 6.0.5 version of MongoDB Community.

How to Install 6.0.5 Edition of MongoDB Community on Windows?

Follow the steps listed below to install MongoDB community edition 6.0.5 on Windows.

Step 1: Download MongoDB Community Edition 6.0.5 MSI for Windows

Head to the MongoDB website, and scroll down in the “MongoDB Community Server” tab. Select the desired version (“6.0.5”), platform (“Windows”), package type as “msi” and hit the “Download” button:

The installer takes some time to download

Step 2: Run MongoDB Community Edition 6.0.5 MSI

Once the MongoDB Community Edition 6.0.5 MSI is downloaded, navigate to the directory where it is present. Run the installer and click on the “Next” button:

Step 3: Accept the User Agreement of MSI

Accept the license and press the “Next” button:

Step 4: Choose the Installation Type of MongoDB Community Edition 6.0.5

It is time to select the installation type, to install all the necessary products and files choose the “Complete” type or else “Custom” type to select them manually:

Step 5: Configure MongoDB as a Service

To configure MongoDB as a service, select the options to install MongoDB as a service and run its service as a Network Service user then click on the “Next” button:

Step 6 (Optional): Install MongoDB Compass for MongoDB Community Edition 6.0.5

While installing the MongoDB Community edition, the user can also install the MongoDB Compass by selecting the checkbox and clicking on the “Next” button. If the user does not want to install it simply press the “Next” button:

Step 7: Install the MongoDB Community Edition 6.0.5 on Windows

The install screen will appear, click on the “Install” button for starting the installation process:

Wait for the installation process to complete:

Step 8: Finish the Installation of MongoDB Community Edition 6.0.5 on Windows

Press the “Finish” button to close the installation prompt:

Step 9: Add MongoDB Environment Variable in Windows

The MongoDB Community Edition 6.0.5 is successfully installed on the system. Let us add the environment variable of MongoDB in Windows. Head into the directory where it is installed usually it gets installed in the “C:\Program Files\MongoDB\Server\6.0\bin” directory by default. Copy the address of the directory:

Search “environment variable” in the Start menu and open “Edit environment variables for your account”:

Select the “Path” and click on the “Edit” button:

A new prompt will open, click on the “New” button, and paste the copied directory address where MongoDB is installed. Click on the “OK” button twice to exit the “Edit environment variables for your account” window:

The environment variable is set for MongoDB in Windows successfully.

Install MongoDB Shell (Fix Error)

To verify the installation of the MongoDB community edition, execute the given below command in the Command Prompt:

mongosh

Output

The output displayed an error message, the command was not recognized.

This error occurred because the Mongo command line tool no longer comes with MongoDB version 6.0. To resolve this issue, visit the MongoDB Shell website. Select a version, platform (“Windows”), package (“msi”) and download it:

Wait for the installer to download.

Run the MongoDB Shell installer and press the “Next” button:

Click on the “Next” button:

Then click on the “Install” button:

Now click on the “Finish” button:

Once the MongoDB Shell is installed, run the given command again in the Command Prompt:

mongosh

Output

The output has accessed the MongoDB Shell on Windows without any error.

Conclusion

Visit the MongoDB website, download the MongoDB Community Edition 6.0.5 MSI, and run it. Accept the license, select the type of installation as “Complete”, configure the MongoDB as a service, and click on the “Install” button. Once it is installed, add its environment system in Windows. The user can install MongoDB compass while installing MongoDB Community Edition.

About the author

Nimrah Ch

I’m a technical writer with a Bachelor's in Software Engineering and Certification in Cyber Security. Through my research and writing, I strive to provide readers with in-depth, informative articles that can help them make informed decisions about their technological needs.