= = = "Install" = = = =
DOS switch to file where the drive letter such as D:\MongoDB\bin
Set Database save location Mongod.exe--dbpath D:\MongoDB\Data [--auth]//User rights
Run Mongo.exe
. bat file
@echo
@pause
Mongod-repair-dbpath "D:\MongoDB\Data"--auth
Mongod-dbpath "D:\MongoDB\Data"--auth
@pause
= = = "User Rights settings" = = =
1. Add an Account
Use admin
Db.adduser (account number, password)//System Admin account (can manage all accounts)
Db.adduser (account number, password, true)//system Read only account
Use database name
Db.adduser (account number, password)//database management account (can manage all database accounts)
Db.adduser (account number, password, true)//database read-only account
2. Delete account (start without--auth when the database server starts non-account verification)
Use admin
Db.system.users.remove ({"Users": "Account"})
Use database
Db.removeuser ("account")
Use System administrator account must switch to admin
3. View your Account
All accounts
Use admin
Db.system.users.find ()
Current Library Account number
Use database
Show Users
C # Driver Connection string
Database administrator account mongodb://account: Password @127.0.0.1
System Administrator Account mongodb://account (Admin): Password @127.0.0.1
MongoDB User Configuration