principleMinor
Mongodb authentication database best practice
Viewed 0 times
practicemongodbauthenticationdatabasebest
Problem
In mongodb you can store user credentials in different databases. E.g. Say you have a
Is there a best practice here? I don't really like having users all over the place. Is there anything wrong with storing all users in
products db, you could store the user products_worker in either database admin or products. Is there a best practice here? I don't really like having users all over the place. Is there anything wrong with storing all users in
admin?Solution
Best practice is keep all users at
admin database. However, some people don't like that they need to use --authenticationDatabase admin (or equivalent) when they login. Especially, if they use only one database.Context
StackExchange Database Administrators Q#195155, answer score: 8
Revisions (0)
No revisions yet.