M001 IDE Error: Database names cannot contain the character '.'

Hello, I’m getting the following error prompt when trying to execute a lab in M001, Chapter 4.

MongoError: database names cannot contain the character ‘.’

I’ve received this error prompt intermittently throughout M001, but I’ve typically been able to resolve it by exiting the IDE, closing my browser, clearing cache etc. At this point, I’m no longer having success with Shell and the IDE tool is not functioning. Has anyone seen similar behavior recently where you see a database name error and do you have any tips?

Step 1: Open IDE
Step 2: Connect: mongosh “mongodb+srv://sandbox.ayqfl.mongodb.net/m001” --username m001-student
note Atlas calls to use “–apiVersion 1” however shell returns an error so i’ve been intentionally omitting this and it has not caused any issues through Chapter 4.
Step 3 :Password: m001-mongodb-basics
Step 4 : Navigate to collection: use sample.training
Step 5: Execute simple command: db.inspections.find({“test”: 1}).pretty()

error returned
MongoError: database names cannot contain the character ‘.’

Thanks in advance,

Hi @Blake_Patterson,

Welcome to the MongoDB University Forums :sparkles:

You have entered the wrong database name here. It should be

use sample_training

use sample_training
switched to db sample_training

Now you are in the sample_training database and you can fire your MQL query:

db.inspections.find({"test": 1}).pretty()

It will work as expected.

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

Kushagra Kesav


Wow. Thank you… I must have looked over that 20+ times and missed it. It’s the little things, ay?

I appreciate your help. Issue resolve and took note for next time.