首页 新闻 搜索 专区 学院

mongodb 副本集创建用户成功后,对应用户自动被删除是什么原因?

0
悬赏园豆:100 [待解决问题]

example-mongodb:PRIMARY> db
admin
example-mongodb:PRIMARY> db.createUser({user:"tom",pwd:"admin123.com",roles:[{"role":"root","db":"admin"}]})
Successfully added user: {
"user" : "tom",
"roles" : [
{
"role" : "root",
"db" : "admin"
}
]
}
example-mongodb:PRIMARY> show users
{
"_id" : "admin.mms-automation",
"userId" : UUID("34c08f3a-63a3-42a2-be32-bba19e2da095"),
"user" : "mms-automation",
"db" : "admin",
"roles" : [
{
"role" : "backup",
"db" : "admin"
},
{
"role" : "clusterAdmin",
"db" : "admin"
},
{
"role" : "dbAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "readWriteAnyDatabase",
"db" : "admin"
},
{
"role" : "restore",
"db" : "admin"
},
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
}
],
"mechanisms" : [
"SCRAM-SHA-256"
]
}
{
"_id" : "admin.my-user",
"user" : "my-user",
"db" : "admin",
"roles" : [
{
"role" : "clusterAdmin",
"db" : "admin"
},
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
}
],
"userId" : UUID("52ba65a4-6a96-42dd-b200-81f507a728b7"),
"mechanisms" : [
"SCRAM-SHA-256"
]
}
example-mongodb:PRIMARY>

Linux-1874的主页 Linux-1874 | 初学一级 | 园豆:102
提问于:2021-01-14 00:40
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册