Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Mongo config servers have different user privilages in each of them?

I found out recently that the set of privileges that users have are not the same in all the 3 config servers. Some users don't even exist in one of the config server. When creating a user don't they all have same set of replica for the 3 config servers?

How can i Fix this?

like image 412
zerocool Avatar asked Aug 25 '15 08:08

zerocool


1 Answers

use db.createUser() to create an user.

use db.grantRolesToUser() to assign privileges to the user.

Reference: mongoDB Privileges , create user, grant privilege

Hope this helps.

like image 117
SUNDARRAJAN K Avatar answered Oct 04 '22 23:10

SUNDARRAJAN K