Effortlessly Connect Robo 3T to MongoDB Atlas in Simple Steps
Written on
Connecting to MongoDB Atlas with Robo 3T and Studio 3T
This guide will walk you through the process of linking Robo 3T or Studio 3T to a MongoDB Atlas cluster.
Robo 3T, previously known as Robomongo, is a graphical interface designed for MongoDB connectivity. The latest iteration supports TLS/SSL and SNI, crucial for connecting to the free tier Atlas M0 clusters.
Prerequisites
Before starting, ensure you have the following:
- The latest version of Robo 3T (or Studio 3T).
- Your public IP address must be whitelisted in Atlas, or you can disable the whitelist by adding 0.0.0.0/0 (navigate to Cluster > Security > IP Whitelist).
- No network restrictions that prevent you from accessing TCP port 27017 for your cluster.
Once you have installed the most current version, launch the application and set up your initial Atlas profile.
Step One: Server Configuration
In the application, you will find four tabs that require completion.
#### Connection Tab
Change the Connection Type from "Direct Connection" to "Replica Set." For the Members section, find your cluster members by visiting the Atlas browser page. Click on the "Cluster0" link, and you will see three links in the regional sub-pane. Click on the first link to access a page titled after the first member entry.
Select the predefined localhost entry (double-click it) and update it to match your first cluster member:
(Change from localhost:27017 to cluster0-shard-00–00-xxxxx.mongodb.net:27017.)
Utilize the (+) button to add more members. Double-click each added entry and modify it to reflect the next cluster member:
- Change to cluster0-shard-00–01-xxxxx.mongodb.net:27017
- Change to cluster0-shard-00–02-xxxxx.mongodb.net:27017
Enter your replica set name in the Set Name field (this is mandatory for Atlas connections). If you are unsure where to find it, follow these steps:
- On your cluster's main page, click "Connect."
- Choose "Connect with the Mongo Shell."
- Select "I have the Mongo Shell Installed."
- Opt for "3.4 or earlier" as the Mongo Shell version.
- Click the "Copy" button to copy the connection string.
Once copied, it will resemble the following:
mongo "mongodb://cluster0-shard-00-00-vkle3.mongodb.net:27017,cluster0-shard-00-01-vkle3.mongodb.net:27017,cluster0-shard-00-02-vkle3.mongodb.net:27017/test?replicaSet=Atlas-shard-0" --ssl --authenticationDatabase admin --username admin --password
From this lengthy string, look for the substring:
replicaSet=Atlas-shard-0
This indicates that your replica set name is "Atlas-shard-0" (note the case sensitivity).
Step Two: Credentials Input
Input your Atlas credentials by entering a username, then a password, and finally, a database name. If you haven't created a database yet, you may use "test."
#### Auth Tab
The next step involves the SSL configuration.
Step Three: SSL Configuration
For Robo 3T, ensure you check the option for SSL protocol and select a self-signed certificate.
#### SSL Tab
The SSH tab can be ignored; simply skip to the next.
#### SSH Tab
Now, test your connection by clicking the test button. If all checks are successful, you will connect to the database.
If you found this article helpful, please share it with others who may benefit!
Let's stay connected on Twitter, LinkedIn, and GitHub! For contributions, consider buying me a coffee.
If you have any further questions, don't hesitate to reach out!
Stackademic 🎓
Thank you for reading! Before you leave, please think about clapping and following the writer! 👏 Follow us on Twitter | LinkedIn | YouTube | Discord. Explore more content on Stackademic.com.
Video Guide: Set-Up MongoDB Atlas Server & Connecting To Studio 3T
This video tutorial will guide you through setting up a MongoDB Atlas server and connecting it to Studio 3T.
Video Guide: Connecting Robo 3T to MongoDB Atlas
Learn how to connect Robo 3T (Robomongo) to your MongoDB Atlas cloud database through this detailed video guide.