@@ -43,29 +43,32 @@ To connect to an instance or deployment not hosted on Atlas, see
43
43
.. figure:: /includes/figures/atlas_connection_copy_string_python.png
44
44
:alt: The connection string copy button in the Atlas UI
45
45
46
- .. step:: Edit and save the connection string
46
+ .. step:: Edit your connection string credentials
47
47
48
48
Paste your connection string into a file in your preferred text editor
49
- and save this file to a safe location for use in the next step .
49
+ and save this file to a safe location for later use .
50
50
Your connection string resembles the following example:
51
51
52
52
.. code-block:: none
53
53
:copyable: false
54
54
55
55
mongodb+srv://<username>:<password>@samplecluster.jkiff1s.mongodb.net/?retryWrites=true&w=majority&appName=SampleCluster
56
56
57
-
58
57
Replace the ``<username>`` and ``<password>`` placeholders with
59
58
your database user's username and password.
60
59
61
- Then, specify a connection to the ``sample_mflix`` database from the
62
- Atlas sample datasets by adding it after the hostname, as shown in
63
- the following example:
60
+ .. step:: Add a database to your connection string
61
+
62
+ Specify a database connection in your connection string by adding
63
+ your database name after the hostname, as shown in the following example:
64
64
65
65
.. code-block:: none
66
66
:copyable: false
67
67
68
- mongodb+srv://<username>:<password>@samplecluster.jkiff1s.mongodb.net/sample_mflix?retryWrites=true&w=majority&appName=SampleCluster
68
+ mongodb+srv://<username>:<password>@samplecluster.jkiff1s.mongodb.net/<database name>?retryWrites=true&w=majority&appName=SampleCluster
69
+
70
+ Replace the ``<database name>`` placeholder with ``sample_mflix`` to
71
+ configure a connection to the ``sample_mflix`` Atlas sample database.
69
72
70
73
After completing these steps, you have a connection string that
71
74
contains your database username, database password, and database name.
0 commit comments