mongodb 增加用户以及认证用户

test>use admin
switched to db admin
admin>db.addUser('yshy','yshy')
{
"user" : "yshy",
"readOnly" : false,
"pwd" : "2059c25b25df531ec5652d3eba0dc175",
"_id" : ObjectId("5556a6da70d9c8c0f6a120ab")
}
admin>db.auth('yshy','yshy') admin>db.system.users.find()
{ "_id" : ObjectId("545ab87bdc558a6592571d5b"), "user" : "yanshiying", "readOnly" : false, "pwd" : "044f63528e7807275411c4731052fe36" }
{ "_id" : ObjectId("5556a6da70d9c8c0f6a120ab"), "user" : "yshy", "readOnly" : false, "pwd" : "2059c25b25df531ec5652d3eba0dc175" }
admin>
上一篇:C#操作Xml:linq to xml操作XML


下一篇:Ognl表达式语言