I trying to use the following commands
mongo “mongodb+srv://cluster0-jxeqq.mongodb.net/test” --username m001-student -password m001-mongodb-basics
I thought maybe the above command needs a one ‘-’ more so I modified
mongo “mongodb+srv://cluster0-jxeqq.mongodb.net/test” --username m001-student --password m001-mongodb-basics
But the same errors appears
I also tried the following string connection:
mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics
Becasuse of this advice “Starting in MongoDB version 4.2, the ssl option has been deprecated and the new corresponding tls option has been added”, I modified the string to:
mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --tls --username m001-student --password m001-mongodb-basics
My versión is 4.2.5.
Thanks in advance for your help.