Connecting to a particular mongo collection of a mongo atlas clustor

I had successfully imported the data from my local system to mongo atlas. On connecting with the cluster0 using Mongo Compass, I got this connection string.



When I copied the string and connected using MongoShell, it directed me to this page where it shows 3 DBs. (admin, chesswear, local)


I want to connect this chesswear database to my nextjs app. So the connection URI in my env.local file should be changed from

MONGO_URI=mongodb://localhost:27017/chesswear TO MONGO_URI=mongodb+srv://mohit_maroliya:<password>

What is my doubt?

I wonder if I put the mongodb+srv://mohit_maroliya:<password> MONGO URI, will it work because it is not selecting any database from the 3 it will encounter.

I just wanted to know what path I had to put in the MONGO_URI to be able to connect to the remote database.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum