Unfortunately, your code shows me a different error on my PC. So it would take me sometime before I can figure out what must have gone wrong with your code.
(This is what I get while executing your code) MongoDB shell version v4.0.5 exception: No digits
(N.B. It is suggested that you use the special tags provided here while attaching a code as it improves readability and separates it from the general content of discussion.)
EDIT : You missed a slash sign after third occurrence of 27017 (inside round brackets). Maybe it prevents looking into the database as the normal reference would look at the cluster but a reference ending with a / allows looking into it. Just a guess. I might be wrong.
@Ravi_Srivastava_75555 It is not in a hang state. The shell is waiting for your input. This generally occurs when you have left some brackets unclosed or some statement incomplete without their arguments. Try checking if all the brackets and quotes are complete.
cut & paste commands sometimes don’t work due to junk/spaces or if it goes to second line
I tried your command and able to login without any issue
I disconnected from my previous session and logged with your command
As @Ramachandra_37567 said, copying sometimes does not work as it greatly differs how spaces and breaks are addressed in your own browser’s formatting engine. Try snapping the terminal and browser windows side-by-side and typing the entire thing. Strangely enough, the code that I have just sent you works out of the box for me and I am unable to reproduce your error.
im having an issue connecting to the atlas cluster. i copied exactly the code from the lecture.
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.
But it keeps telling me [js] syntax error: missing ; before statement @(shell):1:6. i have tried the alternative code provided above but the cursor hangs at a position. i also tried typing the code and not copy paste but to no avail