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. ELK学习实验018:filebeat收集docker日志

    Filebeat收集Docker日志 1 安装docker [root@node4 ~]# yum install -y yum-utils device-mapper-persistent-data ...

  2. final与 static的区别;static代码块以及嵌套类介绍

    本篇文章主要分为两个模块进行介绍:1.final,staic,static final之间的异同:2. static 模块:3.嵌套类的概念 1.final,staic,static final之间的 ...

  3. Activiti脚本任务(ScriptTask)

    Activiti脚本任务(ScriptTask) 作者:Jesai 你一直问为什么到不了远方,请停下数数你的脚步,是不是还没迈开腿 对于没有接触过groovy脚本语言的人来说,可能比较难使用 应用场景 ...

  4. Flask路由+视图补充

    一.路由设置的两种方法 1.装饰器 @app.route('/index/') def index(): return 'Hello World!' 2.源码 route->decorator- ...

  5. Day9-Python3基础-多线程、多进程

    1.进程.与线程区别 2.python GIL全局解释器锁 3.线程 语法 join 线程锁之Lock\Rlock\信号量 将线程变为守护进程 Event事件 queue队列 生产者消费者模型 Que ...

  6. SQLException:The server time zone

    报错信息如下: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represen ...

  7. MySQL5.6数据导入MySQL5.7报错:ERROR 1031 (HY000)

    一.故障现象 今天将一个在MySQL5.7上的数据导入到MySQL5.6里面去,默认存储引擎都是InnoDB,导入报错如下: [root@oratest52 data]# mysql -uroot - ...

  8. Django面试集锦(1-50)

    目录 1.Django ORM查询中select_related和prefetch_related的区别? 2.only与defer的用法? 3.Django ORM是什么? 4.Django创建项目 ...

  9. C++对于C故有问题的改进

    C++继承了所有的C特性,并且提供了更丰富的语法和特性(OOP支持.模板支持等),并且拥有和C语言同样出色的运行效率.针对C语言的固有问题,C++做出了如下的升级: 所有变量都可以在需要使用时再定义( ...

  10. ubuntu 14.04 安装wordpress

    转者注:若没有Apache + PHP + MySQL环境,请参考我的这篇博客 (1)首先下载wordpress, sudo wget http://wordpress.org/latest.tar. ...