Question about the MongoDB cluster URI

In my MongoDB Cluster URI this piece of information is present: “.mongodb.net/myFirstDatabase”. But my database isn’t called “myFirstDatabase”; It’s called “Sandbox” as the lesson suggested. I’m confused why this happens. Can anyone explain it to me?

Hello! @Maurits_Buijs .

In my opinion. It’s just a boilerplate or placeholder. You can safely change it to your database name. Even you connect with that default database name. Mongo won’t create it unless you make queries to it

I had the same question on the first time I use Mongodb Atlas. After created a database and I want to my application to my cluster on Atlas, My database name is taskbook but this is the connection string I got from Mongoab Atlas:

mongodb+srv://admin:<password>@cluster0.1v3jc.mongodb.net/myFirstDatabase?retryWrites=true&w=majority

Hope this help! :slight_smile:

3 Likes