TypeError: db.addUser is not a function : @(shell):1:1 ——mongoDB创建新用户名密码的方法
不多说,旧版本使用
db.addUser("root","root")
新版本使用这句会出现这个错误提示
TypeError: db.addUser is not a function : @(shell):1:1
新版本用的是
{
user: "test",
pwd: "test",
roles: [ { role: "userAdmin", db: "test" } ]
}
)
TypeError: db.addUser is not a function : @(shell):1:1 ——mongoDB创建新用户名密码的方法的更多相关文章
- mongodb 添加用户报错TypeError:db.addUser is not a function (mongodb3.4.1)
1:问题如下: 原因是 新版的MongoDB已经不支持addUser方法了. 改成createUser了. 使用方法如下 2:具体解释一下db.createUser()方法的用法 定义: 创 ...
- TypeError: window.open is not a function
想必大家现在都已经到家了,而苦逼的我还要坐在办公室混拿微薄的工资,技不如人,平常不努力给自己充电,年终一毛钱都没多给.不说这扫兴的话题了,在这给同样在苦逼坚守岗位的同志们节日的问候,新的一年,好运连连 ...
- db.students.batchInsert is not a function :@(shell):1:1
按照<mongdb权威指南>当使用version 3.4.1版本的mongodb,其中使用batchInsert函数进行对students集合进行批量插入 db.students.batc ...
- mongodb3.0 db.addUser报错
> db.addUser("ydkt","ydkt") --19T09:: E QUERY TypeError: Property 'addUser' o ...
- Meteor错误:TypeError: Meteor.userId is not a function
问题描述: 浏览器console提示错误TypeError: Meteor.userId is not a function. 原因分析: 通过查看Meteor API文档,可知该函数由包accoun ...
- extjs之TypeError: d.read is not a function解决方案
在创建如下代码时报出此错:TypeError: d.read is not a function Ext.define('shebyxgl_sheb_model', { extend: 'Ext.da ...
- TypeError: value.getTime is not a function (elementUI报错转载 )
"TypeError: value.getTime is not a function" 2018年07月02日 16:41:24 leeleejoker 阅读数:2091 标签: ...
- TypeError: Buffer.alloc is not a function
错误信息:TypeError: Buffer.alloc is not a function 截图如下: 解决办法(依次从上往下执行): sudo npm cache clean -f sudo np ...
- mongoDB数据库插入数据时报错:db.collection is not a function
nodejs连接mongodb插入数据时,发现mongoDB报错:db.collection is not a function.解决方法: 1.npm下载mongodb2.x.x版本替换3.x.x ...
随机推荐
- Matrix (二分套二分
Given a N × N matrix A, whose element in the i-th row and j-th column Aij is an number that equals i ...
- secureCRT 破解
转自:http://www.cnblogs.com/qingtingzhe/articles/5008902.html
- sublime text 快捷键记录
sublime常用快捷键 Ctrl+D 选词 (反复按快捷键,即可继续向下同时选中下一个相同的文本进行同时编辑) Ctrl+G 跳转到相应的行 Ctrl+J 合并行(已选择需要合并的多行时) Ctrl ...
- Linux系统安装Apache
一,Apache和tomcat的区别与联系 apache是web服务器,web服务器专门处理http请求: tomcat是运行在apache上的应用服务器: apache是普通服务器,本身只支持htm ...
- 使用 PHP + shell 生成 一键设置权限的脚本。
linux 系统 支持PHP脚本一键设置环境.shell脚本一键设置环境.那么 我今天 使用 PHP + shell 生成 一键设置权限的脚本. 举例子:linux服务器 一键配置discuz网站环 ...
- 在Linux中CSV转换成XLSX
在linux中,把csv文件转换成excel表格(xlsx或者xls) $ echo -e 'surname,name,age\nCarlo,Smith,23\nJohn,Doe,46\nJane,D ...
- A - 栈
Description You are given a string consisting of parentheses () and []. A string of this type is s ...
- python接口自动化测试(一)
本节开始,开始介绍python的接口自动化测试,首先需要搭建python开发环境,到https://www.python.org/下载python 版本直接安装就以了,建议 下载python2.7.1 ...
- bzoj 2588 Spoj 10628. Count on a tree (可持久化线段树)
Spoj 10628. Count on a tree Time Limit: 12 Sec Memory Limit: 128 MBSubmit: 7669 Solved: 1894[Submi ...
- Flask(4):wtforms组件 & 数据库连接池 DBUtils
wtforms 组件的作用: --- 生成 HTML 标签 --- form 表单验证 示例代码: app.py from flask import Flask, render_template, r ...