发布网友 发布时间:2022-04-23 20:20
共2个回答
懂视网 时间:2022-04-08 03:03
ydkt","ydkt") 2015-06-19T09:22:37.004+0800 E QUERY TypeError: Property ‘addUser‘ of object admin is not a function at (shell):1:4 >原来在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报错
标签:
热心网友 时间:2022-04-08 00:11
可能的情况有以下几种: