Authentication failed / Your database looks empty ! (mongoDB)

Hello there, i don’t understand why i can’t connect to my DB.
So i’ve got this database :

Also opened in compass :

I tried putting my DB user’s credentials here :

in mongo’s interface i have the user declared but i get this error…

MongoError: Authentication failed.

if i put no credential i’m getting this instead :

√ Connecting to your database
× Your database looks empty! Please create some collections before running the command.

Am i wrong when i put the DB name in the forest interface ?

Hello @bilboramix ! Welcome to our community. :confetti_ball:

We clearly display a weird error message. Sorry for the inconvenience.

Can you open the Show advanced section, you will find the SRV advanced option that can help with authentication.

Let me know if it helps. :pray:

Kind regards,

1 Like

It’s weird, i used forest admin for another project few weeks ago and it worked fine. :thinking:
I’m not sure as this is the second time i’m doing it, maybe i did something wrong in mongo’s interface ?

With SRV putted on, i get this error :

× MongoParseError: URI does not have hostname, domain name and tld

Was it with the same database ?

We might have another approach here:

  • Are you using an atlas cluster to host your database ?
  • Have you whitelisted your IP to be able to connect to the atlas cluster ?

Kind regards,

1 Like

No, this is a new cluster, and new DB, i wanted to re-make a setup on my own, i was with my teacher for the first one :innocent:

So yes, i’m on mongo DB atlas and i’ve whitelisted all IP’s :

Hey @bilboramix :wave:

Instead of localhost, you should be using the cluster URL (Should be visible in Atlas). Don’t forget to check the Use SRV option, and it should be good :+1:

Let me know if that helps


The cluster host looks like this: You can find it in Connect > Connect your application > section 2


Thank you all, it worked with the cluster url in host field ( and SRV putted on.


PS : it’s an issue about my course as they’re showing this :

1 Like