为了账号安全,请及时绑定邮箱和手机立即绑定

mongodb线上环境报错Db.prototype.authenticate method

mongodb线上环境报错Db.prototype.authenticate method

德玛西亚99 2018-11-29 22:18:40
项目部署到阿里云服务器ubuntu14.04时会发生一次重启,看日志说Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.我在这里看到有人遇到同样的问题 https://github.com/Automattic...,说是mongoose的原因,我把mongoose升级到最新版本后还是报这个错。。。这是我连mongodb的链接:mongodb://blog_runner:safeblog@127.0.0.1:27017/blog-appblog_runner是具有读写权限的。如何解决呢?
查看完整描述

1 回答

?
慕田峪4524236

TA贡献1875条经验 获得超5个赞

是与mongoose的版本有关系,我用4.7.0是没有这个提示的,升级到最新4.10.6就提示了


查看完整回答
反对 回复 2018-12-22
  • 1 回答
  • 0 关注
  • 1071 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号