Chapter 2: Importing, Exporting, and Querying Data

I’m following along on Chapter 2 trying to the Atlas cluster via the Mongo Shell using the string (mongo “mongodb+srv://:@.mongodb.net/admin”) and getting the following error "

Based on some forum suggestions, I checked an my IP address is already set to 0.0.0.0/0. Any suggestions?

I believe you have to whitelist your computer ip address in the Atlas cluster on the left menu, you can obtain your current ip address by using ipconfig or whatismyip website. Hope it helps ! :blush:

It says bad authentication means wrong combination of userid/password
Did you give correct pasword when it prompted for password?
Did you type or cut&pasted?
Make sure no extra characters/invalid characters

I can connect to your cluster without any issue

1 Like

Hi Chen_H, thanks for the insight. I believe (hope) I’ve white-listed my IP and still getting the below error. I didn’t see any option for white-listing. See screenshot below.

I tried to follow your steps but didn’t see any option that read white-list. I have an IP address of 0.0.0.0/0 and also added my IP

Hi, can you send me a screenshot of the string you’re using to access the cluster? I checked in Notepad for any white spaces and yes, I’m copying and pasting the string and typing in the password of m001-student and still getting the below error.

You may be giving wrong pwd

mongo “mongodb+srv://sandbox.pc4d4.mongodb.net/admin” --username m001-student
MongoDB shell version v4.0.5
Enter password:
connecting to: mongodb://sandbox-shard-00-00.pc4d4.mongodb.net.:27017,sandbox-shard-00-01.pc4d4.mongodb.net.:27017,sandb
ox-shard-00-02.pc4d4.mongodb.net.:27017/admin?authSource=admin&gssapiServiceName=mongodb&replicaSet=atlas-vc735d-shard-0
&ssl=true
2020-11-23T21:10:22.956+0530 I NETWORK [js] Starting new replica set monitor for atlas-vc735d-shard-0/sandbox-shard-00-

c4d4.mongodb.net:27017 (1 connections now open to sandbox-shard-00-00.pc4d4.mongodb.net:27017 with a 5 second timeout)
Implicit session: session { “id” : UUID(“026da03c-87e9-4a99-a4f1-04d22de89d2f”) }
MongoDB server version: 4.2.10
WARNING: shell and server versions do not match
MongoDB Enterprise atlas-vc735d-shard-0:PRIMARY> db
admin
MongoDB Enterprise atlas-vc735d-shard-0:PRIMARY> show dbs
admin 0.000GB
local 5.850GB


sample_weatherdata 0.002GB
MongoDB Enterprise atlas-vc735d-shard-0:PRIMARY> exit
bye

Try this

mongo “mongodb+srv://sandbox.pc4d4.mongodb.net/admin” --username m001-student --password m001-mongodb-basics

1 Like