Unable to see "connect via Mongo Shell"

image

I am unable to see "connect via Mongo Shell ". I only see connection string while connecting to Cluster.

It’s the connection string that you use to connect via the Mongo shell

Hi @Shubha_19623,

Please copy the connection string that you are seeing on your screen by clicking on the Copy button.

Now paste this command in your terminal and then run it. When a new prompt appears, please enter your password and hit enter.

Hope it helps!

If you have any other query then please feel free to get back to us.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Having error after connecting with connecting via string

I have the exact same Connection screen experience where it is default to Mongo Shell 4.2 and then provides only a connection string. (The video instruction explicitly says not to use the string and has a different screen display experience…but I have no choice) I copy this string into CMD prompt - exchanging username for m001-student within the symbols command prompt immediate responds: The syntax of the command is incorrect.
Win10 cmd: mongo --version returns MongoDB shell version v4.2.1

Even Network connection setting is correct as suggested on Lab2.0 , connected with “ALLOW ACCESS FROM ANYWHERE”

hey shubha - if that is a reply to my post - yes the connect from everywhere step has been done.
note that in experimentation - the syntax of connection from shell to the class cluster worked fine; and that syntax is very different than the string given to me in my sandbox cluster…but that string includes a 5 character ID - - it is the value that you covered with red so it would not display - -
So I reused the syntax that works for connection to the class cluster but replaced my 5 character ID in place of the classes ID (jxeqq) …and now the connection seems to have worked!! but I am still unsure about this…

@James_58604, @Shubha_19623 can you guys show a screenshot of this?

And @James_58604 let’s see a screenshot of the command you used including the error message.

as of this post - - 10hr before the post of [Shubham_Ranjan] has the identical screen shot as my screen experience…where some is blocked out in red, and circled is the copy button. Of course my string info differs.

copying that string in (with the exchange of the correct username) returns a Syntax Error
this string is so very different than the string that works to the class cluster as there is no shard values…


if a screen shot of the command line Syntax Error helps I will provide that…

@Shubha_19623 send me that connection string.

Let’s see exactly what you copy and the error message associated error message.

And also send a screenshot of what’s in the lecture. I would like to see the difference.

Lecture: Connecting to Your Sandbox Cluster from the mongo Shell at the 2 minute mark - this screen shot is not my screen experience. As posted before, my screen experience is identical to the screen shot displayed 10 hrs prior on this dialog

The lecture states we receive a string and a command - - and that we are to ignore the string. In my screen experience today with the current version of Atlas (downloaded today) - the screen experience offers just a string, no command…as per the screen shot 10hrs earlier above.

This is the lecture:

Here are the screenshots from video:
1)


and after continue scrolling down in video:

Thanks @Shubha_19623

Alright, I can see the confusion.

This section of the video was made using an older version of MongoDB and Atlas so your user experience will be different. If you want the exact connection string from the video, you need to select version 3.4 from the dropdown:


NB: Ignore the word “ClusterTest”, that’s my private cluster.

Withing the copied connection string, the command referred to in the video is mongo and the string part is anything to the right.

@Shubha_19623 share the string that you have so I can test it out.

Please note my post from 1 hr prior:

the syntax of connection from shell to the class cluster worked fine (prior lecture video); and that syntax is very different than the string given to me in my sandbox cluster (v4.2 dialog above)…but while this string does not work by itself, it includes a 5 character ID - - it is the value blocked/covered with red so it would not display - - (screen shot 10 hrs earlier)

I reused the syntax that works for connection to the class cluster but replaced my 5 character ID in place of the classes ID (jxeqq) …and now the connection works to my sandbox cluster.

I have progressed to the next lecture video and written in the Video DB.

Same thing even though selecting 3.4 or earlier Mongo Shell Version

Here is String : mongo “mongodb+srv://cluster0-qz4jl.mongodb.net/test” --username m001-student

@James_58604 I know that you can connect, but @Shubha_19623 can’t. Like explained, the string you have from 1hr ago will not work if your mongo version is 3.4. That string is for versions 3.6 and up. To test this, run the following commands in your terminal:
mongo --version
mongod --version

@Shubha_19623 You need to include a --password <password>
Can you send me the version 4.2 version of the connection string and include the password too. I didn’t take the basic course so I don’t have access to this course. I do for other courses.

here is the string that works shell to class cluster (from prior class lecture video):
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

everywhere there is: jxeqq
replace with the 5 characters given in the 4.2 string (that doesn’t work) to your sandbox cluster
(it is those 5 characters covered/blocked in red 11 hrs past)

this then worked from shell to my new sandbox cluster…

Basically, ignore the jxeqq part. The host name part for the newer connection strings is different in format from the older version… it could be anything, and here’s why.
In the older connection strings, you had to specify all three host names and ports, but with this newer way of connecting you only need to include a singular resolvable host name that is setup by the Admin on the DNS server, whereas for Atlas it’s handled automatically by creating the relevant records on the host DNS. And this singular form host name would be different in length and characters from the 3 part host name, plus you must include “mongodb+srv”.

Typically the Curriculum Engineers prefer that you connect using the old form, but I’m surprised that this hasn’t been mentioned in the lectures. There’s definitely no addendum below the video to mention this either?

I’m running some tests.