javascript - mongodb online environment reports error Db.prototype.authenticate method will...
PHP中文网
PHP中文网 2017-06-19 09:07:22
0
1
1924

When the project is deployed to Alibaba Cloud server ubuntu14.04, a restart will occur. Looking at the log, it says
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.
I saw someone had the same problem here https://github.com/Automattic ..., it was said to be caused by mongoose. I still reported this error after upgrading mongoose to the latest version. . .
This is my link to mongodb:

mongodb://blog_runner:safeblog@127.0.0.1:27017/blog-app

blog_runner has read and write permissions. How to solve it?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
習慣沉默

It has something to do with the version of mongoose. When I used 4.7.0, there was no such prompt, but when I upgraded to the latest 4.10.6, it showed up

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template