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

Clarify Default Connection String for Shell

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.3.7
    • Component/s: manual
    • Labels:
      None
    • Last comment by Customer:
      true
    • Actual Time:
      4

      Description

      Some minor clarification to the http://docs.mongodb.org/manual/reference/program/mongo/ page


      Unfortunately, the shell doesn't quite agree with all the other tools
      about how it processes command line arguments and options.
      Specifically:

      the shell parses its first non-option argument as [hostname[:port]/]dbname.

      The other tools take a --host, --port, and --db option, which are
      the only way to point these tools at a MongoDB deployment. The --host
      must either parse as an IP address or else resolve as a hostname, the
      port must parse as a port number, and the db must be a valid database
      name.

      The shell also takes the --host and --port options, but if you
      supply them, then you can't use the hostname and port number as part
      of the non-optional argument, but can only specify a database name.

      The shell does not take a --db option.

        Attachments

          Activity

            People

            Assignee:
            tim.slavin Tim Slavin
            Reporter:
            sam.kleinman Sam Kleinman (Inactive)
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              7 years, 18 weeks, 6 days ago
              Date of 1st Reply: