Description: Increase the user to operate against the database1. Go to database use dbname2. Adding user rights for the current database is for the current data1. Add and verify the user>Use admin> Db.adduser ("Zjx", "Tsjianxin")> Db.auth ("Zjx", "Tsjianxin")2. To view existing users>Db.system.users.find ()3. Now, to configure a read-write permission for another database 51CV-www.2cto.com-User>Use 51CV> Db.adduser ("51CVRW", "51CV") ..."ReadOnly":false...4. Configure a user with read-only permissions>Use 51CV> Db.adduser ("51cvr", "51CV",true)>db.system.users.find () ..."ReadOnly":true...5. Deleting users>Use dbname (admin or 51CV, etc)> Db.system.users.remove ({User: "haha"})>Db.system.users.find ()6. User logon Database Test for: Mongod dbname-u uname-P Passwordmongo Admin-U zjx-p tsjianxin
MongoDB "Increase user authentication, increase users, delete users, modify user passwords, read and write permissions, read-only Permissions"