Hi everyone!
I have some issue with creating new user.
Steps what I did for creation user:
- Connect through terminal by next command:
1.1 mongo mongodb+srv://m220student:m220password@<my_peronal_data>/test - Run next commands:
2.1 use mflix
2.2 db.createUser({user: “mflixAppUser”,pwd: “mflixAppPwd”,roles: [“readWrite”]})
And after that I had exception:
MongoDB Enterprise mflix-shard-0:PRIMARY> db.createUser({user: “mflixAppUser”,pwd: “mflixAppPwd”,roles: [“readWrite”]})
2019-03-01T01:51:50.752+0200 E QUERY [js] Error: couldn’t add user: CMD_NOT_ALLOWED: createUser :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.createUser@src/mongo/shell/db.js:1491:15
@(shell):1:1
What did I wrong?