It seems that the command line is transposing the host and db when using the host formats specified in the command line usage text:
192.168.0.5/foo
or
192.168.0.5:9999/foo
I receive the following errors respectively when connecting using these formats to a valid host and DB.
Error: Database name cannot have reserved characters for mongodb:// URL: mongodb://foo:27017/192.168.0.5
Error: Database name cannot have reserved characters for mongodb:// URL: mongodb://foo:27017/192.168.0.5%3A9999
If I provide an incorrect host specification as
, then the shell will connect as normal.mongo -u <user> -p <pass> foo/192.168.0.5:9999
- duplicates
-
SERVER-31437 Fix parsing of `mongo host/db` connect string
- Closed