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

2 comments:

  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
  2. LuckyClub Casino Site
    LuckyClub is the first licensed online casino to accept the payment of cryptocurrencies in a fully regulated environment. Rating: 0/10 · ‎Review by Lucky luckyclub.live Club Casino · ‎Price range: 0

    ReplyDelete