Changes

Jump to navigation Jump to search
533 bytes added ,  16:13, 25 February 2016
Line 87: Line 87:  
# Restart mongo service
 
# Restart mongo service
 
#:<pre> sudo service mongod restart</pre>
 
#:<pre> sudo service mongod restart</pre>
 +
# Connect to the mongo instance as the administrator:
 +
#:<pre>mongo --port 27017 -u "myUserAdmin" -p "abc123" --authenticationDatabase "admin"</pre>
 +
# Create Additional users as needed. Example:
 +
#:<pre>use reporting
 +
#::db.createUser(
 +
#::    {
 +
#::      user: "reportsUser",
 +
#::      pwd: "12345678",
 +
#::      roles: [
 +
#::        { role: "read", db: "reporting" },
 +
#::        { role: "read", db: "products" },
 +
#::        { role: "read", db: "sales" },
 +
#::        { role: "readWrite", db: "accounts" }
 +
#::      ]
 +
#::    }
 +
#::)</pre>

Navigation menu