[DOCS-3336] Clarify Default Connection String for Shell Created: 02/May/14  Updated: 16/Mar/15  Resolved: 18/Jun/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.7

Type: Task Priority: Major - P3
Reporter: Sam Kleinman (Inactive) Assignee: Tim Slavin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 9 years, 35 weeks ago

 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.



 Comments   
Comment by Githook User [ 18/Jun/14 ]

Author:

{u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}

Message: DOCS-3336: added details about db, host, port options

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/6c8065aa1d82e2e458a156719f8e96e3efe5ad32

Generated at Thu Feb 08 07:45:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.