@@ -46,16 +46,16 @@ indicates that the library cannot connect to a MongoDB deployment:
46
46
47
47
The following sections describe methods that might help resolve the issue.
48
48
49
- Check the Connection String
50
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
49
+ Check the Connection URI
50
+ ~~~~~~~~~~~~~~~~~~~~~~~~
51
51
52
- Verify that the hostname and port number in the connection string are both
52
+ Verify that the hostname and port number in the connection URI are both
53
53
accurate. In the sample error message, the hostname is ``127.0.0.1`` and the
54
- port is ``27017``. The default port value for an instance of MongoDB Server is
54
+ port is ``27017``. The default port value for a {+mdb-server+} deployment is
55
55
``27017``, but you can configure MongoDB to listen on another port.
56
56
57
57
When connecting to a replica set, include all the replica set hosts in
58
- your connection string . Separate each of the hosts in the connection
58
+ your connection URI . Separate each of the hosts in the connection
59
59
string with a comma. This enables the library to establish a connection if
60
60
one of the hosts is unreachable.
61
61
@@ -95,34 +95,34 @@ Check the Credentials Formatting
95
95
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96
96
97
97
One of the most common causes of authentication issues is invalid
98
- credentials formatting in the MongoDB connection string .
98
+ credentials formatting in the MongoDB connection URI .
99
99
100
100
.. tip::
101
101
102
- To learn more information about using connection strings ,
102
+ To learn more information about using connection URIs ,
103
103
see :ref:`Connection URI <php-connection-uri>` in the
104
104
Create a MongoDB Client guide.
105
105
106
- If your connection string contains a username and password, ensure that
106
+ If your connection URI contains a username and password, ensure that
107
107
they are correctly formatted.
108
108
109
109
.. note::
110
110
111
- If your username or password includes any of the following characters, you
112
- must `percent-encode <https://tools.ietf.org/html/rfc3986#section-2.1>`__ it :
111
+ You must `percent-encode <https://tools.ietf.org/html/rfc3986#section-2.1>`__
112
+ the following characters if they appear in your username or password :
113
113
114
114
.. code-block:: none
115
115
:copyable: false
116
116
117
117
: / ? # [ ] @
118
118
119
- Use your percent-encoded username and password in your connection string .
119
+ Use your percent-encoded username and password in your connection URI .
120
120
121
121
Verify the Authentication Mechanism
122
122
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123
123
124
124
Ensure that your credentials and authentication mechanism are correct. You can
125
- specify your authentication credentials in the options of your connection string .
125
+ specify your authentication credentials in the options of your connection URI .
126
126
127
127
If you use the ``$uriOptions`` parameter to specify an authentication mechanism,
128
128
ensure that you set the ``'authMechanism'`` option to the correct mechanism. The
@@ -155,7 +155,7 @@ the username must be defined in the authentication database.
155
155
156
156
The default authentication database is the ``admin`` database.
157
157
To use a different database for authentication, specify the
158
- ``authSource`` option in the connection string .
158
+ ``authSource`` option in the connection URI .
159
159
160
160
The following example instructs MongoDB to use the ``users`` database
161
161
as the authentication database:
@@ -198,9 +198,9 @@ in the Atlas documentation.
198
198
Check the Network Addresses
199
199
~~~~~~~~~~~~~~~~~~~~~~~~~~~
200
200
201
- Verify that the network addresses or hostnames in your connection string
201
+ Verify that the network addresses or hostnames in your connection URI
202
202
are accurate.
203
203
204
204
If your deployment is hosted on MongoDB Atlas, you can follow the
205
205
:atlas:`Connect to Your Cluster </tutorial/connect-to-your-cluster/>`
206
- tutorial to find your Atlas connection string .
206
+ tutorial to find your Atlas connection URI .
0 commit comments