Try Studio 3T for Free

How to Connect to MongoDB Atlas

In this post, we’ll show you how to connect to MongoDB Atlas, MongoDB’s fully-managed cloud database, using Studio 3T.

For other ways to connect, please check out our overview page.

Prerequisites

  1. Get your first MongoDB Atlas cluster for free by following these steps.
  2. Download the latest Studio 3T version on your Windows, Mac, or Linux machine.
What's included in a free MongoDB Atlas cluster?

The free cluster includes:

  • 512 MB of storage
  • Shared RAM
  • Highly available replica sets, end-to-end encryption, automated patches, REST API
  • Max connections: 100
  • Network performance: Low
  • Max databases: 100
  • Max collections: 500

The free tier cluster regions available are:

  • N. Virginia (us-east-1)
  • Frankfurt (eu-central-1)
  • Singapore (ap-southeast-1)
  • Mumbai (ap-south-1)

Get the connection string from MongoDB Atlas

  1. In MongoDB Atlas, click on Context on the top-left corner and choose your project.
  2. Click on the … icon and choose Connect.
  3. Choose Connect Your Application.Choose "Connect Your Application"
  4. Choose your driver and driver version. We use Java and Version 3.6 or later in this example, but the latest version of any driver should also generate a compatible connection string.
  5. Copy the URI connection string. This is what you’ll need to paste in Studio 3T. When setting up your Atlas connection string, set 'Java' as the driver and "3.6 or later" as the version.

Connect to Studio 3T

  1. Open Studio 3T and click on Connect in the top-left corner of the toolbar. This will open the Connection Manager.
  2. Click on New Connection in the top-left corner, which will open a new connection window.
  3. Click on the From URI button.
  4. Paste the connection string you copied from MongoDB Atlas (see step 5 above).
  5. Replace the placeholder “<password>” with your actual password – make sure to replace the brackets too – and click OK.
    When copying the Atlas connection string, replace the <password> placeholder with your real password.
  6. Click through the Server, Authentication, SSL, and SSH Tunnel tabs and verify that the information is correct.
  7. Click Save.
  8. Click Connect.

Import data in JSON, CSV, BSON/mongodump or SQL

If you have an empty cluster, you can easily import JSON, CSV, BSON/mongodump or SQL to MongoDB with Studio 3T’s Import and Export Wizard:

Explore MongoDB data

Click on a collection in the Connection Tree to open a Collection Tab, which is the starting point of all data exploration in Studio 3T.

Click on a connection in the Connection Tree

Here you can view the contents of your MongoDB collection in either Table View, Tree View, or JSON View:

Easily edit data in Table, Tree, and JSON view.

Or access the Visual Query Builder, a drag-and-drop MongoDB query builder ideal for both newcomers and pros:

Once you’ve built your query, click on Query Code tab to see how it translates to Java, Node.js, PHP, C#, Python, and the mongo shell language:

Translate your query from the mongo Shell language into: JavaScript, Java, C#, Python, and PHP.

And that’s just one way of querying data in Studio 3T. There’s also IntelliShell, the built-in mongo shell with robust autocompletion; Aggregation Editor, the stage-by-stage aggregation query builder; and SQL Query, which lets you write SQL to query your MongoDB database.

Learn more

Find MongoDB tutorials on the Studio 3T Knowledge Base.

Pressed for time? Subscribe to the Studio 3T YouTube Channel for quick MongoDB tips, tricks, and how-tos.

Updated on August 2, 2019

Was this article helpful?

Related Articles

Leave a Comment