DEV Community

Cover image for Setting up Local MongoDB Using Mongo Compass on Windows
Jumbo Daniel
Jumbo Daniel

Posted on

Setting up Local MongoDB Using Mongo Compass on Windows

Follow this link to visit the download page for the MongoDB Community Server and and download the latest MSI installer for Windows:
Mongodb community server

As soon as the download completes double click the file and run the installer.
Mongo installation screen

Click on the next page to continue.
Read the end-user license agreements and make sure you click the checkbox to agree with the user terms so that you can proceed to the next page.
Mongo installation screen

Click on the complete button to install all MongoDB features and components.
Mongo installation screen

The default values should work well for most scenarios. Click Next when you are satisfied with your selections.
Mongo installation screen

Next, click the checkbox to to install MongoDB Compass, a graphical interface that you can use to connect to and manage MongoDB servers.
(Here we have to tick the checkbox to install MongoDB Compass since this tutorial was made for using MongoDB and Compass)
Mongo installation screen

Next, click Install to begin installing all of the MongoDB components on your computer.
Mongo installation screen

After the installation is complete, MongoDB Compass will open automatically. If it doesn't open immediately, you can open it by just searching for it from your taskbar.
The next step is to understand how to use MongoDB Compass (it is a very simple and straightforward process). Once it is open, the initial screen will give you the opportunity to connect to a running MongoDB server by providing a connection string:
Mongo Compass

If you click connect without entering any connection string, mongo will just connect to the local database running with the default configurations.

Click Connect to connect to the MongoDB server running on your machine. As soon as you click connect, Compass connects to your local server and shows information about the databases within and allow you to manage your data using the graphical user interface. The admin, config, and local are default databases and you shouldn't delete them.
Mongo Compass connect screen
When you to stop the components after you are done working, click the connect menu in the menu bar and select disconnect to stop the connection to your MongoDB server. Afterwards, you can safely close the MongoDB Compass application.

Thank you for reading.

Top comments (2)

Collapse
 
erimo4real profile image
eromosele

how do i get the connection string from my local host

Collapse
 
smaranh profile image
Smaran Harihar

Thank you