解决方案
在连接数据库字符串后面添加 authSource=admin
"MongoDB": { "Host": "mongodb://touchadmin:[email protected]:27017/TouchAdmin?authSource=admin", "DbName": "TouchAdmin" }
use TouchAdmin db.createUser( { user:"touchadmin", pwd:"touchadmin", roles:[ {role:"dbOwner", db:"TouchAdmin"} ] }
作者:醉酒的姑娘
链接:https://www.jianshu.com/p/49422d79d55d
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 标签:authenticate,protocol,touchadmin,Unable,报错,TouchAdmin,链接 From: https://www.cnblogs.com/wl-blog/p/17620596.html