MongoDB(version3.2)创建用户报错addUser is not a function
来源:互联网 发布:php招聘系统 编辑:程序博客网 时间:2024/05/18 03:04
通过MongoDB命令行,创建用户时,报错如下:
db.addUser("lisi","123456");
2016-11-04T19:41:02.563+0800 E QUERY [thread1] TypeError: db.addUser is not a function :
经过排查原因,由于MongDB3.x版本已经不再支持addUser()方法,用createUser()方法取而代之。
可参考官方文档中关于创建用户的部分:
https://docs.mongodb.com/manual/reference/method/js-user-management/
新增用户时,可指定用户的角色,可参考官方文档中关于内置角色的部分:
http://docs.mongoing.com/manual-zh/reference/built-in-roles.html
http://www.cnblogs.com/SamOk/p/5162767.html(有中文翻译)
另可参考博文:
http://blog.csdn.net/unixpro/article/details/47302855
0 0
- MongoDB(version3.2)创建用户报错addUser is not a function
- mongodb 添加用户报错TypeError:db.addUser is not a function
- mongodb 添加用户报错TypeError:db.addUser is not a function (mongodb3.4.1)
- mongodb 添加用户报错TypeError:db.addUser is not a function (mongodb3.4.1)
- mongodb 添加用户报错TypeError:db.addUser is not a function (mongodb3.4.1)
- MongoDB创建管理员时报错db.addUser is not a function
- js 报错 $ is not a function
- animate is not a function(zepto 使用报错)
- js报错:****is not a function 的解决方法
- js报错$('#form1').ajaxSubmit is not a function...
- js报错$('#form1').ajaxSubmit is not a function...
- Extjs 报错 this.addEvents is not a function
- js报错:TypeError: document.GetElementById is not a function
- js报错 :TypeError: yanzhengma is not a function
- js报错:TypeError: document.GetElementById is not a function
- ajaxFileUpload报错jQuery.handleError is not a function
- intermediate value is not a function报错解决方法
- js 报错(intermediate value)(...) is not a function
- 创建自解压文件
- 《美丽新世界》读后感
- 【十六】马尔科夫决策过程
- UVa 10214 Trees in a Wood.
- bzoj3012[Usaco2012 Dec]First! 一号单词
- MongoDB(version3.2)创建用户报错addUser is not a function
- 解决Win8系统下安装usb blaster驱动提示"文件的哈希值不在指定的目录文件中"
- 读《麦田里的守望者》(塞林格)
- HDU 1087 Super Jumping! Jumping! Jumping!(最大上升子序列)
- 百度地图 点击地图规划路线
- 【JZOJ4861】【NOIP2016提高A组集训第7场11.4】推冰块
- DAY20:leetcode #45 Jump Game II
- 自由与社会
- 自定义柱状图