Tuesday, February 14, 2012

MongoDB security

how to add auth function in your mongoDB. > use admin > db.addUser("root", "rootpassword") add user to your tables > use table1 > db.addUser("user1", "password1") add read only user > use table1 > db.addUser("user2", "password2", true)

how to use mongoDB on AWS EC2

1. find an AIM with mongodb64 and ubuntu1004 by searching AIMs 2. make a new instance with above selected AIM. 3. it will run mongod automatically when start, don't forget to open security for 27017 to 28017 TCP port. use http://...:27017 to check it's available or not.