Tuesday, July 14, 2015

MongoDB Authentication - My Notes




for setting the authentication:
> use admin
> show collections
  system.indexes
  system.users
> db.createUser({ "user" : "panbhatt" , "pwd" : "*******" , "roles" : [ "readWrite" ]})
OR
db.addUser("panbhatt","internet")   // This is OLD
> db.system.users.find()
 // To Verify that the user has been registered.

now switch to another database
> use logs
> Add the user same as above conditions

use db.dropUser("nameofUser") // to drop an user.

http://blog.amussey.com/post/62809509642/mongodb-installing-and-configuring-authentication

1 comment:

  1. Great job I like the content title and the combination of the content that complements the title and the way you drive the point home, some blogs are just written aimlessly without the authors contribution I like your contribution keep posting such kind of great stuff.

    A property management company in Pune,India

    ReplyDelete