CoderSathi
  • Tutorial
    • Java Tutorial
    • Swing Tutorial
    • JDBC Tutorial
    • Java String Tutorial
    • Servlet and JSP Tutorial
  • Mongo DB
  • AWS
  • DevOps
  • Linux
  • Git
Home > How to > How to Connect MongoDB Atlas Using Compass – Step-by-Step Guide

How to Connect MongoDB Atlas Using Compass – Step-by-Step Guide

Learn the concepts, implementation details, and practical steps with a clean developer-focused walkthrough.

Yuba Raj Kalathoki
By Yuba Raj Kalathoki
Last updated: July 1, 2026 · 2 min read · 0 Comments
Share: in X

MongoDB Atlas is a powerful cloud-based database service, and Compass is MongoDB’s official GUI for managing and exploring your database. Following is a simple guide to connect MongoDB Atlas to Compass.

Table of Contents

Step 1: Set Up Your MongoDB Atlas Cluster
Step 2: Download and Install Compass
Step 3: Get Your Cluster Connection String
Step 4: Connect MongoDB Atlas using Compass
Step 5: Explore Your Database

Step 1: Set Up Your MongoDB Atlas Cluster

  1. Log in to MongoDB Atlas: Visit MongoDB Atlas and log in.
  2. Create a Cluster:
    • If you don’t have a cluster, click on Create a Cluster and follow the steps.
    • Choose a free tier if you are just getting started.
  3. Set Up Network Access:
    • Go to the Network Access section under Security.
    • Click on Add IP Address and add your IP (or allow access from anywhere using 0.0.0.0/0 for testing purposes).
  4. Create a Database User:
    • Navigate to Database Access and click Add New Database User.
    • Set a username and password. Make sure you remember them for later.

Step 2: Download and Install Compass

  1. Visit the MongoDB Compass page.
  2. Download the version compatible with your operating system.
  3. Install Compass by following the setup wizard.

Step 3: Get Your Cluster Connection String

  1. In your Atlas cluster, click Connect > Connect your application.
  2. Copy the connection string. It will look like this:
mongodb+srv://<username>:<password>@cluster0.mongodb.net/myFirstDatabase?retryWrites=true&w=majority
  1. Replace <username> and <password> with the database user credentials you created earlier.

Step 4: Connect MongoDB Atlas using Compass

  1. Open MongoDB Compass and click Add new connection.
Connect mongodb atlas using compase
  1. In the connection screen:
    • Paste your connection string in the URI field.
    • Replace <username> and <password> with your credentials if not already done.
Connect mongodb atlas using compase by pasting connection uri
  1. Click Connect.

Step 5: Explore Your Database

Once connected, you’ll see your cluster databases and collections in Compass. You can now perform queries, view documents, or manage your database easily.

That’s it! You’ve successfully connected MongoDB Atlas with Compass. Now you can leverage Compass to manage your database visually and intuitively.

Related Posts:

  • How to Install Ollama on Windows, Linux, and macOS:…
  • Install MongoDB BI Connector on Ubuntu
  • Step-by-Step Guide to Set Up Eclipse with Tomcat…
  • Connect MongoDB Atlas Cluster Using Shell
  • Setting Up an EC2 Instance with Amazon CloudFront…
  • Create Cluster In MongoDB Atlas
Tags:devopshow-tomongodb
Was this article helpful?
← Previous ArticleHow to Upgrade AWS EC2 Ubuntu Version: A Step-by-Step Guide
Next Article →How to Define FeignClient URL in Spring Boot for Local Testing

Leave a Comment Cancel reply

You must be logged in to post a comment.

Recent Posts

  • How to implement Passwordless Authentication in Spring Boot: A Step-by-Step Guide
  • How to Use AWS CloudFront Signed URLs in Spring Boot?
  • How to Fix SSH Agent Forwarding on macOS: The Ultimate Guide for Developers
  • How to Read AWS Secrets Manager in Spring Boot (Step-by-Step)
  • How to Fix “Public Key Retrieval is not allowed” MySQL JDBC Error
CoderSathi

Your go-to resource for Java, Spring Boot, Microservices, AWS, and modern development tutorials.

Linkedin

Quick Links

  • About
  • Contact

Popular Topics

  • Java
  • Spring Boot
  • AWS
  • DevOps
  • MongoDB
  • Linux
  • Git
  • How to
© 2026 CoderSathi. All rights reserved. Privacy Policy · Sitemap