jeudi 18 décembre 2014

mongodb culster, replset, config servers, and mogos all have admin


I have a mongodb cluster with one replSet, 3 config servers, and 2 mongos instances. I logged into mongos using (admin, pwd). admin is given ["userAdminAnyDatabase", "userAdminAnyDatabase", "readWriteAnyDatabase"]. It works well. but when I logged into the replSet directly. I cannot pass authentication using (admin, pwd) again. I found that mongodb culster, replset, config servers, and mogos all have admin databases. They are different. What are the difference? what are the differences when doing authentication?


In fact, I can create the same user to all the three admin database. But in the future, maybe I will encounter some problems when adding new replSet. At that time, maybe I need to shutdown all instances to upgrade authentication. It is bad. I have no ideas.


Thanks, Best,





Aucun commentaire:

Enregistrer un commentaire