MongoDBでユーザ追加
滅多にやらないので忘れる...。2回調べたのでメモする。
- ユーザ: foouser, パスワード:foopassword のユーザを
foo_productionデータベースに追加する場合
$ mongo
MongoDB shell version: 2.0.6
connecting to: test
> use foo_production
> db.addUser("foouser", "foopassword");
滅多にやらないので忘れる...。2回調べたのでメモする。
foo_production データベースに追加する場合$ mongo
MongoDB shell version: 2.0.6
connecting to: test
> use foo_production
> db.addUser("foouser", "foopassword");