create user and database in mongodb terminal code example
Example: mongodb add user
use <your database>
db.createUser({
user: '<some username>',
pwd: passwordPrompt(),
roles: [{
role: 'readWrite',
db: '<your database>'
}]
})
use <your database>
db.createUser({
user: '<some username>',
pwd: passwordPrompt(),
roles: [{
role: 'readWrite',
db: '<your database>'
}]
})