Connect to Your Cluster
Estimated completion time: 5 minutes
You can connect to your cluster in a variety of ways. In this tutorial, you use one of the following methods:
The MongoDB Shell, an interactive command line interface to MongoDB. You can use
mongosh
to insert and interact with data on your Atlas cluster.MongoDB Compass, a GUI for your MongoDB data. You can use Compass to explore, modify, and visualize your data.
A MongoDB driver to communicate with your MongoDB database programmatically. To see all supported languages, refer to the MongoDB Driver documentation.
➤ Use the Select your language drop-down menu to set the connection method for this tutorial.
Note
If you're using the atlas setup
or atlas quickstart
commands
with default options to get started with Atlas, the Atlas CLI
provides you with a mongosh
command to connect to your cluster.
Required Access
To connect to a cluster, you must be a database user.
Prerequisites
Before you start, verify that you have:
A database user on your cluster.
Note
You must have a database user set up on your cluster to access your deployment. For security purposes, Atlas requires clients to authenticate as database users to access clusters.
Connect to Your Atlas Cluster
In this section, you get your cluster's connection string from the Atlas UI and connect to your cluster by using your preferred connection method.
To learn about all supported methods, see Connect to Your Database Deployment. For additional driver examples, see Connect via Your Application.
Next Steps
Now that you've connected to your cluster, proceed to Insert and View Data in Your Cluster.