Connecting Mongo Sandbox Data in Shell

Hi Dear

I have read the previous discussion but still facing the problem to load data ( by connecting sandbox).

Its seems from the lecture that I have to connect sand box which apparently shows "Mongo DB enterprise in my case " !! ( SS attched)

What is missing here ?

Thank you inadvance.

Regards
Amin

Just typing mongo will connect you to default mongod on port 27017
Did you create your sandbox cluster?
You need to use a different command with string you got from your setup steps
It will show Enterprise even in Sandbox but the name will be like
MongoDB Enterprise Cluster0-shard-0:PRIMARY>
Please check your lectures again
Once connected to your sandbox load the file at mongo prompt as below
MongoDB Enterprise Cluster0-shard-0:PRIMARY> load(“loadMovieDetailsDataset.js”)
true--------->indicates success
You can see the contents of your .js file as below
less,more will no work in Windows
type loadMovieDetailsDataset.js|more

Hi Ramachandra,

Thank you for your reply.

Yes, I have created a sandbox cluster ( SS attahced) .-

I have also used “mongo” to connect it.

I will try once more with your recommendation. Please let me know if you have any more suggestions.

Thanks .

Hi @Mohammad_Nurul_13502,

As I can see in the screenshots, you have already created the sandbox cluster. In order to connect to the sandbox cluster from your mongo shell, please follow the below mentioned steps.

Open your atlas account, and then click on connect.

Once you click on connect a new prompt will appear on the screen. You need to click on Connect with the Mongo Shell.

After that you need to click on I have the Mongo Shell installed. Now at the bottom you can see a connection string. Go ahead and click on the Copy button.

Now you need to start your Command line and paste the connection string into it. You will be asked to enter the password. Enter the password that you created while setting up your Sandbox cluster.

Congratulations :slight_smile: , now you are connected to your sandbox cluster.

If you have any other query, feel free to reach out to us. Happy Learning !

Thanks,
Shubham Ranjan
Curriculum Support Engineer

2 Likes

Dear @Shubham_13709,

Thank you very much for your clear and detailed instruction.

I am almost there. Unfortunately, I can’t type password ( not a single word).

Will you please suggest.

Thank you once again.

Hi @Mohammad_Nurul_13502,

For security reasons the password that you type is not visible (But it is getting typed in the background). You can simply go ahead and type the password and hit enter to connect to your sandbox cluster.

If you have any other query, feel free to get back to us. Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer

1 Like