Mongo shell connection

while connection through mongo shell, getting below error

mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-0
0-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?r
eplicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001
-student --password m001-mongodb-basics
2019-02-27T19:00:19.890-0500 E QUERY SyntaxError: Unexpected string
2019-02-27T19:00:19.947-0500 I NETWORK Socket say send() errno:10053 An establi
shed connection was aborted by the software in your host machine. 127.0.0.1:2701
7

It looks like you entered that command while already being in the mongo shell.

yes

from which path i should enter?

At the windows or unix command line.

mongo “mongodb://cluster0-shard-00-00-enj04.mongodb.net:27017,cluster0-shard-00-01-enj04.mongodb.net:27017,cluster0-shard-00-02-enj04.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --ssl --authenticationDatabase admin --username m001-student --password m001-mongodb-basics

Can you provide a screenshot?

attached screenshot

First, I have moved your post in the m001 forum since from the command line you entered I can see that this is the course your taking.

Second, the error message tells you that ssl is not a valid option. So the first thing to do is to try without it. You will find all the possible mongo options at:

https://docs.mongodb.com/manual/reference/program/mongo/

Hi @Sushil_90850,

Adding to @steevej-1495’s reply, make sure you are using the latest version of MongoDB or greater than 3.6 version.

Kanika