Unable to use Mongosh to connect Atlas

I’m new to mongoDB and mongosh, and I want to use mongosh to connect to Atlas. When I follow the official instructions, open mongosh, paste the connection string, and get an error message.
MongoshInvalidInputError: [COMMON-10001] Invalid URI: mongosh “mongodb+srv://cluster0.4imtv.mongodb.net/” --apiVersion 1 --username ivory
Press any key to exit:
My computer is Windows 11 with the latest mongosh installed.
I need help, and thank you!

You might have copied the connection string from a place with weird quotation marks.

Try this:

mongosh "mongodb+srv://cluster0.4imtv.mongodb.net/" --apiVersion 1 --username ivory
1 Like

Thank you for your replay!
C:\Users\ivory>mongosh “mongodb+srv://cluster0.wbpwrrm.mongodb.net/” --apiVersion 1 --username ivory
Enter password: ******
Current Mongosh Log ID: 65b45df2ed53ed22ce32dc8c
Connecting to: mongodb+srv://@cluster0.wbpwrrm.mongodb.net/?appName=mongosh+2.1.1
MongoServerSelectionError: connection timed out. It looks like this is a MongoDB Atlas cluster. Please ensure that your Network Access List allows connections from your IP.
In fact: I have done this (includes your current IP address)

Please give me another suggestion. Thank you very much! :sunny: