Skip to content

DOCSP-48712 edit for proper user/pw info #480

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

Merged
merged 2 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions source/connection-troubleshooting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ issues when attempting to connect to MongoDB.
For more information about connection strings,
see :ref:`Connection URI <golang-connection-uri>` in the Connection Guide.

If your connection string contains a username and password, ensure that they
If your connection string contains a database username and database password, ensure that they
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: isn't this true about non-DB usernames and passwords too? Same question for line 113 in this file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can connection strings contain non-DB username and pws? I was reading the golang connection guide that states that "the connection string contains your database username and, if you are using password-based authentication, your password," so I was under the impression that the connection string can only contain a db user and not any other type of user.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of the enterprise auth mechanisms, which use Kerberos principal and LDAP username for the username parameter.

I would also hope that anyone coming to this page for help would recognize that username and password apply to them even if they're using their db username/password.

For those reasons, I'd vote to keep username and password for this troubleshooting section

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with that! i'll change them back 👍 thanks for the explanation

are in the correct format.

.. note::

If the username or password includes any of the following characters, they
If the database username or database password includes any of the following characters, they
must be `percent encoded <https://tools.ietf.org/html/rfc3986#section-2.1>`__:

.. code-block:: none
Expand Down
4 changes: 2 additions & 2 deletions source/usage-examples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ step to find the
:manual:`connection string </reference/connection-string/>` to define your
``MONGODB_URI`` environment variable to run the usage examples. If your
instance uses :manual:`SCRAM authentication </core/security-scram/>`,
you can replace ``<user>`` with your username, ``<password>`` with your
password, and ``<cluster-url>`` with the URL or IP address of your instance.
you can replace ``<user>`` with your database username, ``<password>`` with your
database password, and ``<cluster-url>`` with the URL or IP address of your instance.

To learn more about connecting to your MongoDB instance, see :ref:`golang-connection-guide`.

Expand Down
Loading