MongoDB Client Access Control: SCRAM-SHA-1 authentication failed, storedKey mismatch
As per the documentation, the object passed to createUser
should contain a user
property (along with the others):
db.createUser({ user : "admin", pwd : "admin", roles : ["root"] })
^^^^ not `createUser`
Probably you're trying to recreate the database with new login and/or password. So, you need to exclude the "/db" folder. The database path's in the docker-compose.yml file. e.g.: "volumes: - ./db:/data/db".