Lab: Connect to your Atlas Cluster issues

Hello all

I guess the training needs to be updated, its too confusing for people who are starting from scratch trying to work with MongoDB
My specific issues is with the command: mongosh “mongodb+srv://” --apiVersion 1 --username m001-student

1 - Why we need to use --apiVersion 1 in the command ? I spent an hour trying to “ignore” it as I saw suggested on several topics, but beside the familiar Error Message that I was supposed to ignore, it never prompted the password as it was supposed to. I was only able to get the get prompted for the password when issuing the command without the --apiVersion 1 parameter
2 - In the instructions we have the following:
You will be prompted to enter the password that you just created:

  • m001-mongodb-basics

I dont know what this mean. m001-mongodb-basis is the password ? It says I “Just created” the password, in which step ? which command did I issue that I created the password ?

3 - In some examples of the same issue Im having, some people are using Admin parameter in some places, some other people seem to not have updated the myfirstdatabase parameter but seems to be working, so should we replace it or not ?
Some people pasted the command they are using without the " in the beggining, or with ’ only. Everything is to vague for people with 0 experience. This instructions in the course need to be clearer and up-to-date

Hi @Diogo_Squarizi_Moraes, welcome to the community.

MongoDB 5.0 introduced Stable APIs.

The MongoDB Stable API (previously labeled the Versioned API) lets you upgrade your MongoDB server at will, and ensure that behavior changes between MongoDB versions do not break your application.
The Stable API allows you to specify which version of the MongoDB API your application runs against.

But the monogsh instance provided by MongoDB University does not support this --apiVersion flag. I have communicated this to the Curriculum Team. Please be rest assured that we will release a fix soon.

Did you follow all the instructions mentioned in the previous lecture? It explains everything on how to create a Database User and use them while connecting with Mongosh.
Learn more about Add Database User in Atlas.

You can replace the “myFirstDatabase” in the connection string with the choice of database you want to use. Even if you are connected using a different database in the connection string, you will still be able to change the database using the following command:

use <--database name-->

Lastly, thank you for asking all these brilliant questions and adding your suggestions as well, we really appreciate it.

If you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,

1 Like