專案部署到阿里雲(yún)伺服器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的連結(jié):
mongodb://blog_runner:safeblog@127.0.0.1:27017/blog-app
blog_runner是具有讀寫權(quán)限的。如何解決呢?
認(rèn)證高級(jí)PHP講師
是跟mongoose的版本有關(guān)係,我用4.7.0是沒(méi)有這個(gè)提示的,升級(jí)到最新4.10.6就提示了