A
A
Alexander2015-04-22 18:52:58
MongoDB
Alexander, 2015-04-22 18:52:58

How to setup mongodb user?

How to set up a mongodb user or how to make it work.
> show dbs
2015-04-22T18:49:53.854+0300 E QUERY Error: listDatabases failed:{
"ok" : 0,
"errmsg" : "not authorized on admin to execute command { listDatabases: 1.0 }",
"code" : 13
}
at Error ()
at Mongo.getDBs (src/mongo/shell/mongo.js:47:15)
at shellHelper.show (src/mongo/shell/utils.js:630:33)
at shellHelper (src/ mongo/shell/utils.js:524:36)
at (shellhelp2):1:1 at src/mongo/shell/mongo.js:47

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kano, 2015-04-22
@Kano

Register user in admin system database with root role docs.mongodb.org/manual/reference/built-in-roles

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question