If you have an existing MongoDB database or connection, scroll to the bottom of this section and mark the section complete.
In this exercise, you’ll configure MongoDB Atlas to connect to the cluster you created in Exercise 1.
For this, you will need the IP address of the device that will connect to the service.
If you plan to connect to MongoDB Atlas on the same device where you’re setting up the service, MongoDB Atlas can find the local IP address automatically.
As part of this exercise, you’ll also set up an administrator account for accessing the cluster. You’ll then generate a connection string or Uniform Resource Identifier (URI) based on this account. You’ll be able to use the connection string in Studio 3T to access MongoDB Atlas.
The Connect to Cluster1 dialog box appears, showing the two steps you must take to configure your connection.
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.
To start this process, click the Choose a connection method button. The Connect to Cluster0 dialog box reappears, providing a different set of options.
You’ll again be presented with two steps.
These are the settings that Studio 3T requires to connect to MongoDB Atlas.
When you select the driver and version, the service automatically updates the connection string in the Step 2 section.
When you use the connection string or URI, you must replace the <password> placeholder with the password you created for the administrator account. Don’t forget to remove the <> as well.