MongoDB: Error parsing command line: unrecognised option '--sslMode'
Faced the same issue while working on mongo-university's M001: MongoDB Basics course. The demo connection for the course expects a ssl connection but the mongo binary I had threw this error:
$ mongo "mongodb://primary:27017,replica1:27017,replica2:27017/test?replicaSet=Cluster0-shard-0" --ssl --authenticationDatabase admin --username <user_name> --password <password>
Error parsing command line: unrecognised option '--ssl'
try 'mongo --help' for more information
Root cause of the issue is that the mongo
binary provided in the community
edition does not support --ssl
option.
I downloaded the evaluation version for the enterprise edition and connected successfully the M001:demo mongo server.
More details are in mongo Jira issue SERVER:21622