authentication - Mongodb revoke acccess to connect test database -


i have ec2 instance mongodb 3.2.0 installed. have user admin access. can connect user , perform operation remotely. 1 can connect database test remote if knows ip mongo 11.11.11.11. although not able make operations, want restrict access user credentials can connect server.

first need create users , grant roles users, example:

use admin db.createuser(   {     user: "myuseradmin",     pwd: "abc123",     roles: [ { role: "useradminanydatabase", db: "admin" } ]   } ) 

then need start server --auth parameter

mongod --auth 

more information here


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -