javascript - mongodb線上環(huán)境報(bào)錯(cuò)Db.prototype.authenticate method will...
問題描述
項(xiàng)目部署到阿里云服務(wù)器ubuntu14.04時(shí)會(huì)發(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升級(jí)到最新版本后還是報(bào)這個(gè)錯(cuò)。。。這是我連mongodb的鏈接:
mongodb://blog_runner:safeblog@127.0.0.1:27017/blog-app
blog_runner是具有讀寫權(quán)限的。如何解決呢?
問題解答
回答1:是與mongoose的版本有關(guān)系,我用4.7.0是沒有這個(gè)提示的,升級(jí)到最新4.10.6就提示了
相關(guān)文章:
1. mac OSX10.12.4 (16E195)下Mysql 5.7.18找不到配置文件my.cnf2. mysql - 怎么生成這個(gè)sql表?3. mysql儲(chǔ)存json錯(cuò)誤4. php - 公眾號(hào)文章底部的小程序二維碼如何統(tǒng)計(jì)?5. mysql - 表名稱前綴到底有啥用?6. mysql - 數(shù)據(jù)庫表中,兩個(gè)表互為外鍵參考如何解決7. Navicat for mysql 中以json格式儲(chǔ)存的數(shù)據(jù)存在大量反斜杠,如何去除?8. 在mybatis使用mysql的ON DUPLICATE KEY UPDATE語法實(shí)現(xiàn)存在即更新應(yīng)該使用哪個(gè)標(biāo)簽?9. mysql - 數(shù)據(jù)庫建字段,默認(rèn)值空和empty string有什么區(qū)別 11010. sql語句 - 如何在mysql中批量添加用戶?
