I wanted to create a user,and got authorize error.
So I modify the /etc/mongod.conf
:
#auth=True
And then restart the mongo,and create the user on terminal :
use admin
db.createUser(
{
user: "superAdmin",
pwd: " ",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
}
)
It was success,then I modify /etc/mongod.conf
back to :
auth=True
And I use remote login with robomongo
And I want to check db.serverStatus().connections
But nothing happened?
How can I fix this?