MongoDB新建用户报错

MongoDB新建用户报错:
Error: couldn't add user: Use of SCRAM-SHA-256 requires undigested passwords :

需要修改加密方式

db.createUser(
{          
    user: "admin",
    pwd: "xxxxx",
    roles:[{ role: "readWrite", db: "admin" }],
    mechanisms : ["SCRAM-SHA-1"] 
})

你可能感兴趣的:(数据库,mongodb新建用户报错)