javascript - mongodb線上環境報錯Db.prototype.authenticate method will...
PHP中文网
PHP中文网 2017-06-19 09:07:22
0
1
1877

專案部署到阿里雲伺服器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是具有讀寫權限的。如何解決呢?

PHP中文网
PHP中文网

认证高级PHP讲师

全部回覆(1)
習慣沉默

是跟mongoose的版本有關係,我用4.7.0是沒有這個提示的,升級到最新4.10.6就提示了

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!