文章詳情頁
javascript - mongodb線上環(huán)境報錯Db.prototype.authenticate method will...
瀏覽:164日期:2023-08-14 10:50:35
問題描述
項目部署到阿里云服務(wù)器ubuntu14.04時會發(fā)生一次重啟,看日志說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是具有讀寫權(quán)限的。如何解決呢?
問題解答
回答1:是與mongoose的版本有關(guān)系,我用4.7.0是沒有這個提示的,升級到最新4.10.6就提示了
標簽:
JavaScript
相關(guān)文章:
1. python - Django有哪些成功項目?2. 實現(xiàn)bing搜索工具urlAPI提交3. MySQL主鍵沖突時的更新操作和替換操作在功能上有什么差別(如圖)4. Python從URL中提取域名5. 關(guān)于mysql聯(lián)合查詢一對多的顯示結(jié)果問題6. 數(shù)據(jù)庫 - Mysql的存儲過程真的是個坑!求助下面的存儲過程哪里錯啦,實在是找不到哪里的問題了。7. node.js - 微信小程序websocket連接問題8. 直接打字符不可以嗎?>和>有區(qū)別嗎9. node.js - windows10下的npm全局路徑的復(fù)原或者將npm徹底刪除?10. Python中使用超長的List導(dǎo)致內(nèi)存占用過大
排行榜

熱門標簽