时间:2021-07-01 10:21:17 帮助过:2人阅读
原来在mongodb3.0中addUser已被废弃,具体参考:
http://docs.mongodb.org/manual/reference/method/db.createUser/#create-administrative-user-with-roles
> db.createUser({user:‘ydkt‘,pwd:‘ydkt‘,roles:[‘readWrite‘,‘dbAdmin‘]}) Successfully added user: { "user" : "ydkt", "roles" : [ "readWrite", "dbAdmin" ] } >
mongodb3.0 db.addUser报错
标签: