We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 80ab76d + b1db2b2 commit 0e8abc6Copy full SHA for 0e8abc6
source/connect.txt
@@ -162,6 +162,16 @@ To connect to a replica set:
162
163
mongosh "mongodb://mongodb0.example.com.local:27017,mongodb1.example.com.local:27017,mongodb2.example.com.local:27017/?replicaSet=replA"
164
165
+.. note::
166
+
167
+ ``mongosh`` adds the ``directConnection=true`` query parameter to the
168
+ connection string automatically unless at least one of the following is
169
+ true:
170
171
+ - The ``replicaSet`` query parameter is present in the connection string.
172
+ - The connection string uses the ``mongodb+srv://`` scheme.
173
+ - The connection string contains a seed list with multiple hosts.
174
175
Connect using TLS
176
~~~~~~~~~~~~~~~~~
177
0 commit comments