Chapter 1 : cannot connect

when I copy paste link given, it shows the following error even though I have created the cluster and username as mentioned in the course.

mongo “mongodb+srv://sandbox.mknpw.mongodb.net/myFirstDatabase” --username m001-student

Welcome to the community!

Did you hit enter after pasting the connect string?
It will prompt for password

You should be connected to your cluster when running the test results

The string you received from the Atlas UI doesn’t have the name of your data base. It has “/myFirstDatabase”. You need to change that to the actual name of your database.

On the main Atlas page there is a little folder on the top left. The name next to the folder is the name of your database.

mongodb+srv://sandbox.mknpw.mongodb.net/<name_of_your_database>” --username m001-student

It’s very confusing. The instructions tell you to copy the string and paste it but it doesn’t mention that you need to change the database name. I spent a good deal of time last week figuring that out.

It would be a lot better if the string just had the database right off the bat.

Post a screenshot of the whole IDE. We need to see where and how you enter the command.

Hi Anusree_S, did you connect your sample database? I’m facing the same problem. So, I couldn’t complete the Lab: connect to your Atlas database on Chapter 1. I’ve tried change my database name on given URL, but it doesn’t work as well. I don’t know way.

Hi Rolf_Vogel, thanks so much for answering. I’m facing the same problem. So, I couldn’t complete the Lab: connect to your Atlas database on Chapter 1. I’ve tried change my database name on given URL as you said, but it doesn’t work as well. I don’t know way.

I can’t see my database name anywhere. Could you please help to find it. I remember that When I first create my sample database I didn’t give any name to it.

Please show the screenshot of your IDE where you tried to connect to your cluster

It is not dependent on db_name.You can connect to your cluster with dummy DB test or some non existent DB like myFirstDatabase
Once you are connected a db you can always switch to the required DB by use db_name command

Your issue could be something else
What is the exact error you are getting
Don’t show us the test results output.Unless you can connect successfully to your cluster no use running test results

Hi there, I’ve figured out what is happening. The poblem is the IDE on the https://university.mongodb.com/mercury/ > Lab: Connect to your Atlas cluster. it is broken. I mean that IDE doesn’t work properly. Once you try your code for the first time it never trully reset the workspace anymore, and keep trying the same code again and agian. I have tried the instruction “mongo-version” (after push the reset workspace button), but I get the same response as usual [FAIL] “Successfully connected to the Atlas Cluster”… etc etc. It doesn’t make sense at all. If I passa the instruction mongo-version the answer, “befor run Test”, can’t be - [FAIL] "Successfully connected to the Atlas Cluster.

I think you don’t know what is happening at all. Absolutely. You seems completely lost (I guess). It is my first time at mongoDB. this forum is full of question from students all over the world who can’t to do your labs. What such first impression. For sure, I gonna quit mongoDB. It doesn’t work at all.

Who knows how the name of our sample database? test? sample database? sandbox? where we can find that

There is a space quota restriction of 512MB in M0 free tier clusters
Please check if you have any old DBs or if you have imported twice the sample data.Please drop all unnecessary dbs and try again.It will work
Once sample data is imported successfully you will see your DBs with show dbs command from shell

The database name is next to the gray folder in the top left of the Atlas main page. See the image below.

That’s very unlikely but possible.

Your screenshot, the one showing mongo-version, indicates that you are entering the command in the wrong area. You entered mongo-version in the file editing area. You have to enter your commands in one of the terminal area. Please revise the section where the IDE is presented if you are unsure about the terminals.

M001 is not the name of your database. It is the name of your Atlas project. You need to click on the COLLECTIONS button to access the collections. Collections are grouped under their database.

The database name used on the connection string is not important for this course.

Hi Steevej Juneay, thanks for aswering me. But, unfortunatelly, you are wrong. The given instruction was “repalce with the name of the database that connections will use by default”. Loog it up!

The big thing is this MongoDB tutorial is horrible. People around the world here are dealing with the same problem. Are all those people wrong? The problem here regards to UX. I believe that this tutorial must be improved based on the users feedbacks in order to make it more clear and easy to follow. It is mandatory.

Yes you are right. I’ve put the URL on the wrong place.

But I have one question: why when I wrote the given URL (instruction) and push the Run Test buttom the IDE give a error message? It means that the IDE has executed the instruction. It doesn’t make sense. I tought I was inserting the instruction on the right place since the IDE was executing it. This IDE interface and the given instruction must be improved.

Now we have a UX problem. The error message must be a solving-probm itself, I mean it must provide clear, and usefull instructions to the user in order the lead to the solution, but it not happend.

Despit my mistake, the Reset Workspace buttom is not working at all. It must to be fixed.

I’m so disappointed with the mongoDB tutorial for beginners.

And I’m afraid of the next steps. What unsolvable problem I’m gonna to face here?

Some instructions might be a little bit unclear, but I think the following are clear.

and

1 Like

You have to use the URL of the cluster you created. That’s why we need to see a screenshot of how you connect. We need to see the exact command.

Welcome to the community Paulo,
Don’t worry, things will go smoother once you get some familiarity withe the IDE and MongoDB. Everyone of us got more or less frustration at the beginning of any learning process. Nevertheless, the tutorials have to be improve.
Good luck

1 Like