4
Mongodb use with Java and accurate, through Java run the following command on mongoDB:
db.grantRolesToUser( "joao", [ {role:"dbOwner",db:"loja"} ] )
That is, I need to add a scroll to an existing user, and I need to specify what the database is. After a lot of cracking up, I still can’t find the right way. Remembering that in the command I need to specify which is the database (as above), because at that time I will be logged in to the admin database, so I need to say that the command refers to the database store. I keep looking. But if anyone knows and can give me a clue, I’d appreciate!