-
Notifications
You must be signed in to change notification settings - Fork 453
Open
Labels
questionFurther information is requestedFurther information is requested
Description
// 源端用户(用于读取 oplog、状态及写 checkpoint)
use admin
db.createUser({
user: "mongoshake_src",
pwd: "password",
roles: [
{ role: "read", db: "admin" },
{ role: "read", db: "config" },
{ role: "read", db: "local" },
{ role: "read", db: "db1" }, // db1
{ role: "read", db: "db2" }, // db2
{ role: "readWrite", db: "mongoshake" },
{ role: "clusterMonitor", db: "admin" }
]
})
// 目标端用户(用于写入同步目标库)
use admin
db.createUser({
user: "mongoshake_dst",
pwd: "password",
roles: [
{ role: "readWrite", db: "db1" }, // db1
{ role: "readWrite", db: "db2" }, // db2
{ role: "dbAdminAnyDatabase", db: "admin" }
]
})
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested