mongoose报错:DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.

其实我们阅读报的警告就可以解决:在mongoose连接的时候在第二个参数的对象中加入

  useUnifiedTopology: true

即为:

mongoose.connect(dbConfig.dbs, {
useNewUrlParser: true,
useUnifiedTopology: true //这个即是报的警告
}).then(res => {
console.log('数据库连接成功')
})

To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.的更多相关文章

  1. ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statemen

    转自:http://www.cnblogs.com/iosdev/archive/2013/07/15/3190431.html mysql 配置文件目录:/etc/my.cnf root 密码为空的 ...

  2. The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

    skip-grant-tables下 GRANT ALL PRIVILEGES ON *.* TO helei IDENTIFIED BY 'MANAGER' WITH GRANT OPTION; 执 ...

  3. mysql error 1290 hy000:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statemen' 解决方案

    如果在执行授权命令的时候报错 mysql> grant all privileges on *.* to root@"; ERROR (HY000): The MySQL server ...

  4. mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解决方法

    本文为大家讲解的是mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execut ...

  5. ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

    centos7.5 使用into outfile备份失败 问题: mysql> select * from world.city into outfile '/tmp/world_city.da ...

  6. 1209 -The MySQL server is running with the --read-only option

      1209 - The MySQL server is running with the --read-only option so it cannot execute this statement ...

  7. ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe

    在Mysql集群中创建用户时.出现如下错误! mysql> create user 'testuse'@'localhost' identified by '111111'; ERROR 129 ...

  8. MYSQL导入csv类型的数据出现The MySQL server is running with the --secure-file-priv option

    今天尝试使用 into outfile导出数据的时候出现错误: The MySQL server is running with the --secure-file-priv option so it ...

  9. Windows sql语句正则匹配导出数据到本地 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

    尝试使用 into outfile导出数据的时候出现错误: The MySQL server is running with the --secure-file-priv option so it c ...

随机推荐

  1. Python基础————文件操作

    文件操作 4.1 文件基本操作 obj = open('路径',mode='模式',encoding='编码') # 表示要干嘛 读 还是写 obj.write() #写什么内容 obj.read() ...

  2. restframework 解析器、渲染器、url控制组件

    一.解析器 解析器的作用就是服务端接收客户端传过来的数据,把数据解析成自己可以处理的数据.本质就是对请求体中的数据进行解析. 1.分类 from rest_framework.parsers impo ...

  3. python __init__()类构造方法

    构造方法用于创建对象时使用,每当创建一个类的实例对象时,python解释器都会自动调用它. class Person: def __init__(self): print("调用构造方法&q ...

  4. 「 从0到1学习微服务SpringCloud 」05服务消费者Fegin

    系列文章(更新ing): 「 从0到1学习微服务SpringCloud 」01 一起来学呀! 「 从0到1学习微服务SpringCloud 」02 Eureka服务注册与发现 「 从0到1学习微服务S ...

  5. 60 个让程序员崩溃的瞬间,太TM真实了

    前方高能!笑死人不偿命系列~ 表演即将开始,吃东西的请停下来,不然你会后悔的 1. 公司实习生找 Bug 2. 在调试时,将断点设置在错误的位置 3. 当我有一个很棒的调试想法时 4. 偶然间看到自己 ...

  6. Frameworks.Entity.Core 6 Specification

    Specification internal 1 A logic AND Specification密封类AndSpecification<T>继承 抽象类CompositeSpecifi ...

  7. Educational Codeforces Round 81 (Rated for Div. 2) B. Infinite Prefixes

    题目链接:http://codeforces.com/contest/1295/problem/B 题目:给定由0,1组成的字符串s,长度为n,定义t = sssssss.....一个无限长的字符串. ...

  8. Object类、常用API_2

    主要内容 Object类 Date类 DateFormat类 Calendar类 System类 StringBuilder类 包装类 学习目标 -[ ] 能够说出Object类的特点 -[ ] 能够 ...

  9. Python PE8编程规范

    参考博客:https://blog.csdn.net/weixin_39723544/article/details/82144280 1.使用四个空格而不是tab进行缩进 2.默认使用utf-8编码 ...

  10. Linux下启动/关闭Oracle

    一.Linux下启动Oracle Linux下启动Oracle分为两步: 1)启动监听: 2)启动数据库实例: 1.登录服务器,切换到oracle用户,或者以oracle用户登录 [admin@dat ...