Tuesday, December 16, 2025

MongoDB Installation on windows with screen shot.

Requirement to install MongoDB on Windows. 






Download:- 

  • Click here to download MongoDB Community Server
  • Choose the Windows (x64) version
  • Download the MSI installer





MongoDB Shell (mongosh):- 

Click here to download the Install MongoDB Shell (Mongosh).


  • Double-click the downloaded .msi file
  • Select Complete Installation
  • Keep all default options selected
  • Allow MongoDB to install as a Windows Service
  • Click Next and complete the installation

MongoDB Community Server Install:-

Note:- Installation may take a few minutes. 

Create MongoDB Connection:-


After creating the connection, click "Add New Connection."
  • Open MongoDB Compass (installed with Community Server)
  • Click “Add New Connection”
  • Use the default connection string:
  • mongodb://localhost:27017
  • Click Connect

Install MongoDB Shell (mongosh):- 


  • Run the mongosh installer
  • Click Next
  • When prompted for the installation path:
  • Create a new folder in the C Drive
  • Folder name: Mongosh
  • Example: C:\Mongosh
  • Complete the installation


Set Environment Variable for mongosh:-



Copy the bin folder path, which is in the Program Files folder.

  --> 
C:\Program Files\MongoDB\Server\8.2\bin

 1. 
Environment variable created manually for the community
Server.

1. Search the environment variable.

1. Set the path that is copied from the bin folder.


 


 2. Environment variable created through CMD for Shall.

  • Open System Properties
  • Press Win + R
  • Type sysdm.cpl and press Enter
  • Go to Advanced → Environment Variables
  • Under System Variables, select Path → Click Edit
  • Click New and add:
  • C:\Mongosh\bin
  • Click OK on all windows

Now we test it.



Open the CMD + write the "mongosh"

  • C:\Users\lenovo>mongosh
Connection should be successful.

Now, check the Database through the CMS.

  • test> show dbs

MongoDB Installation Completed Successfully


No comments:

Post a Comment

If you have any problem please let me know.