文章詳情頁
javascript - mongodb線上環境報錯Db.prototype.authenticate method will...
瀏覽:155日期:2023-08-14 10:50:35
問題描述
項目部署到阿里云服務器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-app
blog_runner是具有讀寫權限的。如何解決呢?
問題解答
回答1:是與mongoose的版本有關系,我用4.7.0是沒有這個提示的,升級到最新4.10.6就提示了
標簽:
JavaScript
相關文章:
排行榜
