Skip to content

Update URI docs to include .collection information. #2141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions source/reference/connection-string.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following is the standard URI connection scheme:

.. code-block:: none

mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database[.collection]][?options]]

The components of this string are:

Expand Down Expand Up @@ -60,13 +60,14 @@ The components of this string are:

Optional. The default value is ``:27017`` if not specified.

#. ``/database``
#. ``/database[.collection]``

Optional. The name of the database to authenticate if the
connection string includes authentication credentials in the form
of ``username:password@``. If ``/database`` is not specified and
the connection string includes credentials, the driver will
authenticate to the ``admin`` database.
authenticate to the ``admin`` database. The database may also
include the collection name.

#. ``?options``

Expand Down