I have created mongodb user with command
use admin
db.createUser(
{
user: \"superuser\",
pwd: \"12345678\",
roles: [ \"root\" ]
}
)
You need to create an User in database which you are operating on, not the admin DB.
Use this command,
use twitter-mongo;
db.createUser({
user: "superuser",
pwd: "12345678",
roles: [ "root" ]
});
Instead of this,
use twitter-mongo
db.createUser({
user: "superuser",
pwd: "12345678",
roles: [ "root" ]
});