分片集群启用加密之后登陆到mongos能正常认证
mongos> use zlfzy
switched to db zlfzy
mongos> db.auth("zlfzy","zlfzy@666")
1
mongos> show collections
person
mongos>
但是现在我想启用system.profile功能,这个不能在mongos操作的,要登陆到shard下面的每个节点操作,现在登陆到节点就无法认证了
shard1:PRIMARY> use zlfzy
switched to db zlfzy
shard1:PRIMARY> db.auth("zlfzy","zlfzy@666")
Error: Authentication failed.
0
请问该如何操作? 才能登陆认证到单个节点?
好吧,我自己找到答案了,集群用户不能用来认证链接到单个shard节点,必须要在shard节点单独建立用户