javascript - mongodb線上環(huán)境報(bào)錯(cuò)Db.prototype.authenticate method will...
問(wèn)題描述
項(xiàng)目部署到阿里云服務(wù)器ubuntu14.04時(shí)會(huì)發(fā)生一次重啟,看日志說(shuō)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.我在這里看到有人遇到同樣的問(wèn)題 https://github.com/Automattic...,說(shuō)是mongoose的原因,我把mongoose升級(jí)到最新版本后還是報(bào)這個(gè)錯(cuò)。。。這是我連mongodb的鏈接:
mongodb://blog_runner:safeblog@127.0.0.1:27017/blog-app
blog_runner是具有讀寫(xiě)權(quán)限的。如何解決呢?
問(wèn)題解答
回答1:是與mongoose的版本有關(guān)系,我用4.7.0是沒(méi)有這個(gè)提示的,升級(jí)到最新4.10.6就提示了
相關(guān)文章:
1. 百度地圖api - Android百度地圖SDK,MapView上層按鈕可見(jiàn)卻不可觸,怎么解決?2. java - 往數(shù)據(jù)庫(kù)插入的值為空的數(shù)據(jù),說(shuō)我數(shù)據(jù)太長(zhǎng)了3. 求救一下,用新版的phpstudy,數(shù)據(jù)庫(kù)過(guò)段時(shí)間會(huì)消失是什么情況?4. 想找個(gè)php大神仿個(gè)網(wǎng)站。5. 這是什么情況???6. 微信支付 - python做微信企業(yè)付款出現(xiàn)CA證書(shū)錯(cuò)誤7. python執(zhí)行cmd命令,怎么讓他執(zhí)行類似Ctrl+C效果將其結(jié)束命令?8. 老哥們求助啊9. APP上傳到電腦服務(wù)器,出現(xiàn)數(shù)據(jù)上傳不完整的問(wèn)題10. javascript - 使用百度文本編輯器ueditor不顯示樣式問(wèn)題
