Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13503

Add more mongo connection examples

      Description

      In our docs page for the mongo client:
      https://docs.mongodb.com/manual/reference/program/mongo/#syntax

      We have a couple of examples for connecting with various options. It would be a good idea to add some more examples for more complex connection strings for example:

      Kerberos Authentication

      mongo 'mongodb://user%40EXAMPLE.COM@mongodb1.example.com.local:27017,mongodb2.example.com.local:27017,mongodb2.example.com.local:27017/?authSource=$external&authMechanism=GSSAPI&replicaSet=replA'
      

      Special Character in the password

      mongo 'mongodb:/user1:changeme%40123@mongodb1.example.com.local:27017,mongodb2.example.com.local:27017,mongodb2.example.com.local:27017/?authSource=admin&replicaSet=replA'
      

      The same location in the docs also contains double quotes around all URI's the examples all work across platforms. But this can cause problems if there are (non-encoded) special characters in the URI. For *nix and Windows Powershell you should use single quotes and double quotes for the Windows CMD prompt. It might be a good idea to add this clarification also.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            Unassigned Unassigned
            Reporter:
            james.phelan@mongodb.com James Phelan (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              1 year, 25 weeks, 1 day ago