MongoDB Enterprise >use abcdb //切换到abcdb库
MongoDB Enterprise >db.createUser({user: "abc",pwd: "abc123",roles: [ { role: "readWrite", db: "abcdb" } ]});
Successfully added user: {
"user" : "abc",
"roles" : [
{
"role" : "readWrite",
"db" : "abcdb"
}
]
}