To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
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.的更多相关文章
- 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 密码为空的 ...
- 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; 执 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
随机推荐
- VMware Workstation CentOS7 Linux 学习之路(4)--守护服务(Supervisor)
目前存在三个问题 问题1:ASP.NET Core应用程序运行在shell之中,如果关闭shell则会发现ASP.NET Core应用被关闭,从而导致应用无法访问,这种情况当然是我们不想遇到的,而且生 ...
- org.springframework.core.type.classreading.ClassMetadataReadingVisitor 异常
今天项目启动的时候发现了一个异常: Exception in thread "main" org.springframework.beans.factory.BeanDefinit ...
- windows下配置tomcat的虚拟路径编译器为IDEA
在tomcat中配置好后发现运行项目还是无效 我们需要打开tomcat的配置,把下方的红色区域勾选上即可生效 具体原因如下 那是由于默认时IDEA的热部署机制,会在以下路径: [C:\Users\系统 ...
- spring boot配置spring-data-jpa的时候报错CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.NoSuchMethodError
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager f ...
- python面向对象(一切皆对象)
使用面向对象的思想设计一个乌龟的角色: 表面特征:绿色.有4条腿.重10kg.有外壳等等 行为特征:爬.吃.睡觉.将头和四肢缩到壳里等等 class tortoise: bodycolor = &qu ...
- latex之在windows环境下能够在latex中使用中文
今天要把前段时间的实验用英语先记录下来,自己就想根据原来会议的模版弄一个简易的页面(英语),突然想到之前用英文模板时是不能输入中文的,于是想着怎么在latex中输入中文,折腾了许久,终于成功了,现在分 ...
- Maven的学习之路1
对于下列这段Maven的命令行有不懂之处,在zgmzyr的博客上得到了解释.非常感谢这位博友,写在自己的随笔上以便查看和修改. 1. 创建项目 $ mvn archetype:generate -Dg ...
- 微软CEO:我们员工以及他们家人的健康与安全是我们最高的优先级!
在肺炎疫情开始之初,微软中国各个部门就立即采取了各种的防控和关怀措施. 在昨天,微软 CEO Satya Nadella 给微软中国全体员工写了一封邮件. 其中,最让我们感动的就是这句话:" ...
- 并发队列之ConcurrentLinkedQueue
本来想着直接说线程池的,不过在说线程池之前,我们必须要知道并发安全队列:因为一般情况下线程池中的线程数量是一定的,肯定不会超过某个阈值,那么当任务太多了的时候,我们必须把多余的任务保存到并发安全队列中 ...
- Arduino系列之按键模块(二)
上一节简单介绍啦一下按键模块怎么使用 但是在使用过程中会常常出现延时时间过长,有时候按键会失灵 所以,接下来,我将优化程序,使得按键按下时,就能使count加1 下面是程序思路:同样的定义按键脚: 定 ...