只读账号
db.createUser({
"user": "xxx",
"pwd": "password",
"roles": [
{
"role": "read",
"db": "database"
}
]
})
读写账号
role: readWrite
xiaochun@blog:~$less mongo-add-account.html.md
db.createUser({
"user": "xxx",
"pwd": "password",
"roles": [
{
"role": "read",
"db": "database"
}
]
})
role: readWrite
(END) [q] 回到目录
// 写下过程,留下答案。
↑/↓ 或 j/k 滚动 · 空格/PgDn/PgUp 翻页 · Home/End · q 返回 · : 命令