Skip to content
Studio 3T - The professional GUI, IDE and client for MongoDB
  • Tools
    • Aggregation Editor
    • IntelliShell
    • Visual Query Builder
    • Export Wizard
    • Import Wizard
    • Query Code
    • SQL Query
    • Connect
    • Schema Explorer
    • Compare
    • SQL ⇔ MongoDB Migration
    • Data Masking
    • Task Scheduler
    • Reschema
    • More Tools and Features
  • Solutions
  • Resources
    • Knowledge Base
    • MongoDB Tutorials & Courses
    • Tool/Feature Documentation
    • Blog
    • Community
    • Testimonials
    • Whitepapers
    • Reports
  • Contact us
    • Contact
    • Sales Support
    • Feedback and Support
    • Careers
    • About Us
  • Store
    • Buy Now
    • Preferred Resellers
    • Team Pricing
  • Download
  • My 3T
search

Academy 3T

  • Explore our courses
    • MongoDB 101: Getting Started
    • MongoDB 201: Querying MongoDB Data
    • MongoDB 301: Aggregation
  • Get certified

Lesson 2, Exercise: Setting up MongoDB Atlas

MongoDB 101: Getting Started Introduction to MongoDB Atlas Lesson 2, Exercise: Setting up MongoDB Atlas

We recommend doing this exercise and creating a free Atlas cluster for learning purposes.

If you already have an existing MongoDB database or connection you can use for learning purposes, click to Connecting to MongoDB with Studio 3T to move on to the next lesson.

In this exercise, you’ll set up MongoDB Atlas using the free M0 service tier and get a connection string which you can use to create a Studio 3T connection.

The setup process consists of registering with the MongoDB Atlas service and configuring a cluster. When registering with the service, you must provide an email address, first name, last name, and password.

For assistance on IP whitelisting mentioned in the video above, see How to fix MongoDB Atlas Whitelisting Issues.

To set up MongoDB Atlas

1. Go to the MongoDB Atlas registration page.

Open the MongoDB Atlas Registration Page

2. If you have a Google account, you can sign up with that by clicking the Sign Up with Google button. Skip to step 6.

Otherwise, fill in the required information (email address, first name, last name, and password).

3. Click the terms of service and privacy policy links, which should open on a new tab.

Review the terms, and then return to the Get started free form.

4. If you want to continue with the registration, select the I agree to the terms of service and privacy policy check box.

5. Click the Create account at the bottom of the form. You will be sent a verification email. Once you receive the mail and verify, by clicking the enclosed link, you will be returned to MongoDB Atlas in your browser.

6. You will be sent to a page where you can mention your goal, the type of application you are building and your  preferred programming language. Answer according to your own preferences – This does not affect the process.

7. Once you have submitted that form, Atlas will ask you to choose a cluster type. Choose Shared and click on Create a cluster.

You should also receive a welcome email, which confirms that you’re registered with MongoDB Atlas and includes a link for logging onto the service.

8. In the Cloud Provider & Region section, the aws option is selected as the default provider, but you can select any provider. All three platforms support the free service tier.

9. Beneath the list of providers, select a region.

We recommend a region near yourself for best network performance.

10. Expand the Cluster Tier section and ensure that M0 Sandbox is selected. This is the free M0 service level.

11. Expand the Cluster Name section and type Cluster1 in the text box.

12. Click the Create Cluster button at the bottom of the web page.

13. Once you click the Create Cluster button, you will be asked to set up a database user (and password) that can be used when connecting to the MongoDB Atlas cluster you just created. This is separate from your Atlas account username and password.

To make it easier to connect to MongoDB Atlas from Studio 3T, your password should include only alphanumeric characters, that is, letters and numbers only with no special characters. 

If you use special characters, you will need to encode them when creating a connection string for accessing the MongoDB service.

To generate a password automatically, click the Autogenerate Secure Password button. A password will be generated that includes only alphanumeric characters. Be sure to save the password somewhere secure.

14. Immediately below the form for setting up the username and password is a section where you can add IP addresses to your access list. Atlas only allows particular IP addresses to connect to the cluster to improve security. Only the IP addresses (or ranges) in the access list can connect to the project’s cluster. `

Select My Local Environment of the two larger options.

  • If you plan to connect from the computer you’re currently using, click Add My Current IP Address and then click Add Entry.
  • If you plan to connect from a different computer, click on the IP address field and enter the IP address for that computer, then enter a description of that computer in the description field, and then click Add Entry. You can edit the IP address, add IP addresses, or delete them at any time in case you change devices.

When done, click Finish and Close and you will be returned to the Clusters overview.

15. Atlas will then complete deploying and initialising the database cluster and inform you when done. When it has completed that task return to the Cluster overview..

The overview will now includes a listing for your new cluster, as shown above.

The cluster information shown includes the service level, cloud provider, and region, along with details about operations, connections and logical size, all of which currently show zero amounts.

16. We now need to get a Connection String, also known as a URI, to connect Studio 3T to the database. Click on the Connect button in the Cluster1 panel on the Overview page. The Connection Choices dialog will appear.

17. Select Connect your application

(If you see a different dialog, select MongoDB Drivers in the Connect to your application section)

18. The dialog will change to the driver selection dialog.

In the section ❶ select Java in the driver selection and 4.3 or later in the version selector.

19, The “mongodb+srv:…” string in section ❷ will update automatically, This is the connection string. Click on the copy icon to the right of the string to take a copy of it. Save that string in a safe location.

20. Before using the connection string, you will need to incorporate the password and, possibly, the username.

  • If you have only created one user, the name of that user will already be included in the string. Here is it “admin”. If you have more than one user, <username>will appear in the connection string. You will have to replace that <username> (including the angled brackets) with the name of the user you created.
  • The string will contain <password> and this will need to be replaced with the password for the user in the username section.

Once these changes have been made, you will have a complete connection string, including login credentials. Remember to store this connection string securely. We will use the completed connection string/URI in the next lesson, to connect Studio 3T to your new MongoDB database.

Previous Lesson
Back to Lesson
Next Lesson
  • Course Home Expand All
    Introduction to MongoDB and Studio 3T
    1 Quiz
    Test your skills: Introduction to MongoDB and Studio 3T
    Introduction to MongoDB Atlas
    1 Topic
    Lesson 2, Exercise: Setting up MongoDB Atlas
    Connecting to MongoDB
    1 Topic | 1 Quiz
    Lesson 3, Exercise: Connecting to MongoDB via Studio 3T
    Test your skills: Connecting to MongoDB
    The MongoDB Basics: Databases, Collections & Documents
    7 Topics | 2 Quizzes
    Lesson 4: Understanding MongoDB Documents: Fields & Data Types
    Test your skills: Understanding MongoDB Documents
    Lesson 4: Comparing MongoDB vs SQL Concepts
    Lesson 4, Exercise 1: Creating a collection from a .json file
    Test your skills: Creating a Collection
    Lesson 4, Exercise 2: Reviewing the collection in different views
    Lesson 4, Exercise 3: Using Visual Query Builder to query data
    Lesson 4, Exercise 4: Updating data directly within the collection
    Post-Basics Course Feedback
    Using SQL in MongoDB Aggregation
    3 Topics | 1 Quiz
    Lesson 5, Exercise 1: Running a SQL aggregate query in MongoDB
    Test your skills: Using SQL in MongoDB Aggregation
    Lesson 5, Exercise 2: Exporting a SQL query to the Aggregation Editor
    Lesson 5, Exercise 3: Editing a query in the Aggregation Editor
    Importing and Exporting MongoDB Data
    3 Topics | 1 Quiz
    Lesson 6, Exercise 1: Importing document data from a .csv file
    Lesson 6, Exercise 2: Exporting document data to a .json file
    Lesson 6, Exercise 3: Exporting document data to a new collection
    Test your skills: Importing and Exporting MongoDB Data
    Running MongoDB Queries on the mongo Shell
    4 Topics | 1 Quiz
    Lesson 7: Introducing IntelliShell
    Lesson 7, Exercise 1: Using IntelliShell to load and run a script file
    Lesson 7, Exercise 2: Using IntelliShell’s auto-completion features to write queries
    Lesson 7, Exercise 3: Running queries in IntelliShell and viewing the results
    Test your skills: Running MongoDB Queries on the mongo Shell
    Course Extras
    Return to MongoDB 101: Getting Started
  • Studio 3T

    MongoDB Enterprise Certified Technology PartnerSince 2014, 3T has been helping thousands of MongoDB developers and administrators with their everyday jobs by providing the finest MongoDB tools on the market. We guarantee the best compatibility with current and legacy releases of MongoDB, continue to deliver new features with every new software release, and provide high quality support.

    Find us on FacebookFind us on TwitterFind us on YouTubeFind us on LinkedIn

    Education

    • Free MongoDB Tutorials
    • Connect to MongoDB
    • Connect to MongoDB Atlas
    • Import Data to MongoDB
    • Export MongoDB Data
    • Build Aggregation Queries
    • Query MongoDB with SQL
    • Migrate from SQL to MongoDB

    Resources

    • Feedback and Support
    • Sales Support
    • Knowledge Base
    • FAQ
    • Reports
    • White Papers
    • Testimonials
    • Discounts

    Company

    • About Us
    • Blog
    • Careers
    • Legal
    • Press
    • Privacy Policy
    • EULA

    © 2023 3T Software Labs Ltd. All rights reserved.

    • Privacy Policy
    • Cookie settings
    • Impressum

    We value your privacy

    With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes ("analytics and marketing") and to provide you with additional functions (“functional”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data.

    By clicking “Accept all”, you consent to the storage of cookies and the processing of personal data for these purposes, including any transfers to third countries. By clicking on “Decline all”, you do not give your consent and we will only store cookies that are necessary for our website. You can customize the cookies we store on your device or change your selection at any time - thus also revoking your consent with effect for the future - under “Manage Cookies”, or “Cookie Settings” at the bottom of the page. You can find further information in our Privacy Policy.
    Accept all
    Decline all
    Manage cookies
    ✕

    Privacy Preference Center

    With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes ("analytics and marketing") and to provide you with additional functions (“functional”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data. Please choose for which purposes you wish to give us your consent and store your preferences by clicking on “Accept selected”. You can find further information in our Privacy Policy.

    Accept all cookies

    Manage consent preferences

    Essential cookies are strictly necessary to provide an online service such as our website or a service on our website which you have requested. The website or service will not work without them.

    Performance cookies allow us to collect information such as number of visits and sources of traffic. This information is used in aggregate form to help us understand how our websites are being used, allowing us to improve both our website’s performance and your experience.

    Google Analytics

    Google Ads

    Bing Ads

    Facebook

    LinkedIn

    Quora

    Hotjar

    Reddit

    Functional cookies collect information about your preferences and choices and make using the website a lot easier and more relevant. Without these cookies, some of the site functionality may not work as intended.

    HubSpot

    Social media cookies are cookies used to share user behaviour information with a third-party social media platform. They may consequently effect how social media sites present you with information in the future.

    Accept selected