2

We're still fairly new to MongoDB, and I'm curious if storing the user account in the same database as the data is really a wise idea. The db.createUser() documentation didn't seem to cover this topic, or I missed it while re-reading the page.

Where should I specify, especially when the account doesn't belong to only one database?

Should every account go inside the admin database?

Should I make a separate database for storing user accounts?

use someDb #<----what I'm wondering about when doing:
db.create({ "user": "someUser",
    "pwd":"somePassword",
    "roles":[
        {"role": "readWrite", "db":"someDb"},
        {"role": "readWrite", "db":"someOtherDb"}
    ]
})

Maybe a more experienced admin could guide me on some best practices here. As we're all learning, I need to make sure we're making good decisions.

Thanks in advance!

intrand
  • 21
  • 2

0 Answers0