Friday, October 10, 2014

Windows 8 MongoDB in secure mode

  • add auth=true in mongo.cfg file
  • Start mongod.exe in console or use windows service configured in (http://devsuggestion.blogspot.com/2014/10/mongodb-windows8-installation.html)
  • Start mongo.exe in another console
  • use admin
  • db.addUser("user","password")
  • use test
  • db.auth("user","password")
  • db.addUser("testuser","testpassword")
  • Now test db is accessible using username/password only

No comments:

Post a Comment