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