**Challenge:** Install and Set Up Mongoose

Tell us what’s happening:
Hello guys. I don’t know what i doing wrong to cannot connect to the DB. The only error i’m receiving is ‘“mongoose” should be connected to a database’. So my code is there, i did set the user, password and database name correct?

Your code so far


Challenge: Install and Set Up Mongoose

Link to the challenge:


I’ve edited your post to remove your sensitive information. As a general rule, you do not want to post the credentials for your database anywhere public.

As for the bug, have you verified that you whitelisted the requisite IP addresses in your MongoDB Atlas settings?

hello, this database is going only to be used in the test and the password is random generated, but thanks anyways !
yes i did allowed any IP’s.

My main concern is that if i’m using the correct syntax

The correct syntax will be:


You can have this generated from the MongoDB website, as well. :slight_smile:

Without this part? i mean, without the quotes and MONGO_URI?

MONGO_URI='root(...)password(...)nameDB *only example*'

You do want the variable declaration, yes.

I was trying to show the syntax for the URI string. Try removing the <> from around your “cluster0”?

1 Like

Its Done!! Thank you so much :smiley: