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 ...
随机推荐
- 双引号" "和单引号' '区别
双引号是字符串,单引号是字符 “\n”与'\n': 相同点: 都能起到换行作用 不同点: "\n" <=> {'\n', '\0'} '\n' <=> ...
- idea开启/关闭单词拼写检查
- 数据结构之线性顺序表ArrayList(Java实现)
一.ListMe接口: import java.util.ArrayList; //实现线性表(顺序表和链表)的接口://提供add get isEmpty size 功能public interfa ...
- spring封装的RabbitMQ
spring这么牛逼的团队,封装了RabbitMQ,简化了RabbitMQ的使用,那肯定是要使用spring-rabbit了 一.简介 二.使用方法 1.消费者 public class Foo { ...
- 笔试算法题(31):将有序数组转换成BST表示 & 线段树的应用
出题:要求将一个有序整数数组转换成最小深度的Binary Search Tree表示: 分析:由于需要是最小深度,所以BST应保持平衡,左右节点数大致相当,并且BST中当前根节点大于所有其左子树中的元 ...
- Runlevel in Linux
运行级别(Runlevel)指的是Unix或者Linux等类Unix操作系统下不同的运行模式.运行级别通常分为7等,分别是从0到6,但如果必要的话也可以更多. 例如在大多数Linux操作系统下一共有如 ...
- 爬虫框架urllib 之(二) --- urllib基础
urllib 官方文档:https://docs.python.org/zh-cn/3/library/urllib.html urllib介绍 Urllib是python内置的HTTP请求库,是py ...
- python——文件管理
文件操作分为读.写.修改 一.读文件 f = open(file='D:/工作日常/兼职白领学生空姐模特护士联系方式.txt',mode='r',encoding='utf-8') data = f. ...
- windows10开启内置ubuntu系统,使用xshell连接
windows安装配置ubuntu系统内置子系统 官方文档:https://docs.microsoft.com/zh-cn/windows/wsl/about https://www.jianshu ...
- parse XML & js
parse XML & js how to parse xml data in js? https://stackoverflow.com/questions/17604071/parse-x ...