Connect MongoDB Atlas Cluster to MongoDB Compass
Last Updated :
27 Feb, 2025
MongoDB Compass is a free GUI for MongoDB. We might want to connect MongoDB Atlas Cluster to MongoDB Compass to take benefit of the GUI model for database administration. By connecting MongoDB Atlas, the fully managed cloud database service, to MongoDB Compass, developers can easily interact with their cloud-based MongoDB databases without relying on the command line
This guide explains how to connect MongoDB Atlas Cluster to MongoDB Compass. The connection process involves obtaining a connection string from MongoDB Atlas, configuring MongoDB Compass settings, and establishing a connection for efficient database management.
Why Connect MongoDB Atlas to MongoDB Compass?
Connecting MongoDB Atlas to MongoDB Compass allows developers to take advantage of MongoDB's graphical user interface (GUI) for efficient database administration, offering several benefits:
- Visual Database Management: Manage your data, collections, and databases with an intuitive interface.
- Ease of Use: No need for complex command-line operations; everything is accessible via the GUI.
- Real-time Data Exploration: Query, update, and visualize your MongoDB data effortlessly.
Steps to Connect MongoDB Atlas Cluster to MongoDB Compass
Follow the steps mentioned below to connect the MongoDB Atlas cluster to the MongoDB Compass:
Step 1: Install MongoDB Compass
Before establishing a connection to MongoDB Atlas, we need to have MongoDB Compass installed on our machine. Follow these steps:
1. Download MongoDB Compass:
- Go to the official site of MongoDB compass and click the download now button.
MongoDB compass Interface- Go to the MongoDB Compass Download (GUI) section and select the version, operating system, and click the download button. The exe file will be downloaded automatically.
MongoDB GUI version download section
MongoDB version and package2. Install MongoDB Compass:
Once downloaded then install the MongoDB compass. Search and execute the downloaded exe and the MongoDB compass will be installed automatically.
Step 2: Login/Signup to MongoDB Atlas Account
- Go to the official MongoDB Atlas site and create a new account if we have otherwise logged in to your account.
- Click the try free button. We will reach the signup/login page if not logged into your account.
MongoDB Atlas dashboard
Atlas SignUpAfter logging in, you’ll be redirected to the MongoDB Atlas Dashboard, where you can manage clusters, databases, and users.
MongoDB Atlas database dashboardStep 3: Creating the MongoDB Atlas Cluster
- Select the database option from the left sidebar and we will see the option below "Create a database". If we already have a database created then we will see details of the cluster in which the dataset is created.
- Assuming we don't have a database so first we have to create a cluster and inside the cluster, we will have our databases.
- Atlas cluster is nothing but reserving some space on cloud services like AWS and Google Cloud to store the information of the datasets that we will create. The cluster configuration is according to the user's access location and frequent usage or that the paid services are provided.
As a beginner, we will use the free services. Let's create a cluster by clicking the option "create a database".
MongoDB Atlas cluster creationThe list of services, regions, and providers (AWS, Google Cloud, Azure) will be displayed. If a large number of users access your database then you can go either higher computing or storage services but for now, we will use free service.
Select the M0 free and then click on Create to create a free cluster. Next step you have to complete the Captcha. After that you will be redirected to the database dashboard and the new cluster will be created.
cluster configuration settingsNext, go to the security section in the left sidebar and there you will find the option to create a user for the database you will create. This user will have read and write operations and the permissions also can be changed. Ensure the username and password are not the same as the Atlas account password.
database username/password settingStep 4: Copy the Cluster Connection String
- Again go to the database section and you will find the details about the cluster that you have created. Now we will connect this with the MongoDB compass.
- Click the connect button, the right side of the cluster name Cluster0.
Cluster DetailsNext, a window will open. Click on the Drivers option.
Cluster connection, connect option detailsChoose the appropriate driver (point 1) and copy the connection string (point 3).
Connection stringStep 5: Open MongoDB Compass and Paste the Connection String
With MongoDB Compass installed and the connection string copied, it's time to connect to your MongoDB Atlas cluster.
- Start the MongoDB Compass and we will see the dashboard like the below.
MongoDB Compass connection dashboardStep 6: Connect to Your Cluster
Next, paste the copied connection string into the new connection String field, replace the password with the actual database user password that you have created in step 3, and then click connect.
password modificationAfter that, you will be connected to your MongoDB Atlas. You can create or modify a database through MongoDB Compass Dashboard.
MongoDB compass dashbopard after Atlas connectionConclusion
In conclusion, utilizing MongoDB Compass and integrating it with the MongoDB Atlas dashboard will simplify database interaction. Without the need for complicated command-line procedures, users can create, update, and query data in databases with ease when using a graphical user interface (GUI). Having MongoDB Compass connected to the MongoDB Atlas dashboard improves database administration in general. By following the simple steps outlined above, you can quickly set up MongoDB Atlas and MongoDB Compass to enhance your database management experience.
Similar Reads
MongoDB Compass vs MongoDB Atlas
MongoDB is a widely-used NoSQL database known for its flexibility, scalability, and high performance. Two key tools associated with MongoDB are MongoDB Compass and MongoDB Atlas, each serving distinct purposes. While MongoDB Compass provides a graphical interface for managing databases locally, Mong
5 min read
How to Connect MongoDB Atlas Cluster From an Application?
To connect your application to MongoDB Atlas, a cloud-based, fully-managed NoSQL database, you'll first need to set up a MongoDB Atlas cluster and configure a few essential settings. MongoDB Atlas offers a secure, scalable platform to manage your database without the hassle of manual maintenance, ba
7 min read
How to Connect Mongodb Compass to Flask
An effective GUI tool for managing and visualizing MongoDB data is MongoDB Compass. On the other hand, a well-liked Python web framework for creating web apps is called Flask. Integrating your MongoDB data into your Flask web application may benefit from connecting MongoDB Compass to Flask. Through
2 min read
Sharded Cluster Components in MongoDB
MongoDB's sharding capability is a powerful feature that enables horizontal scaling by distributing data across multiple servers or "shards." With the exponential growth of data and the need for scalability, MongoDB's sharded clusters provide an efficient way to handle large datasets, improve perfor
6 min read
How to Connect Node.js To MongoDB Atlas Using Mongoose?
MongoDB Atlas is a cloud-based database service that offers robust features and scalability for managing our data. Here we will use Express.js for the server framework and Mongoose for interacting with MongoDB. And also we use the Ejs for our front end to render the simple HTML form. In this tutoria
6 min read
How to Connect Mongo DB with AWS using ATLAS?
The MongoDB Atlas provides the Application deployment solution by MongoDB hosting on AWS. MongoDB Atlas handles operational tasks such as backups, updates, and security configurations. There are many ways to connect MongoDB with AWS depending on specific use cases and requirements: MongoDB Atlas (Fu
5 min read
Connect MongoDB (AWS) from Local Machine using WinSCP and MongoDB Compass
Pre-requisite: AWS and MongoDB In this article, we are going to connect to the Mongo database of the AWS Ubuntu Server instance using WinSCP and learn how to get connected to the server from your local machine using MongoDB Compass. If you haven't installed a MongoDB server in your AWS EC2 instance
4 min read
How to Connect Mongodb Authentication by Node.js?
MongoDB is a popular NoSQL database that provides high performance, high availability, and easy scalability. In many applications, you need to connect to a MongoDB database with authentication to ensure data security. This article will guide you through the process of connecting to a MongoDB databas
3 min read
Creating and Deploying an Atlas Cluster in MongoDB
MongoDB Atlas is a fully-managed cloud database platform that simplifies deploying, managing, and scaling MongoDB clusters in the cloud. Whether you're a developer or a database administrator, understanding how to set up and deploy a MongoDB Atlas cluster is crucial for leveraging MongoDBâs powerful
6 min read
Creating an Atlas Cluster from a Terraform Template in MongoDB
Introducing automation into database management can greatly enhance efficiency and consistency. MongoDB Atlas, a popular cloud database service, offers a convenient platform for managing MongoDB databases. By using Terraform, an Infrastructure as Code (IaC) tool, users can automate the provisioning
7 min read