Krypex
Krypex

Reputation: 1

MongoDB : "Couldn't add user : Could not find role"

I'm trying to create a role and an user for my MongoDB database. I created the role, but when I try to create the user I get this error:

Couldn't add user : Could not find role XXX

However when I try to create the role again, mongo tells me the role already exists.

What am I supposed to do? This is for a school project, I'm not familiar with MongoDB.

MongoDB errors

Upvotes: 0

Views: 1006

Answers (1)

Wernfried Domscheit
Wernfried Domscheit

Reputation: 59563

Looks like you added some extra spaces in your database name: " cubesdb ".

Try "cubesdb"

Upvotes: 0

Related Questions