Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user@ubuntu:/$ mongo
- MongoDB shell version: 2.2.3
- connecting to: test
- > use mytest
- switched to db mytest
- > db.testcollection.insert({"message":"Hello, remote user!"})
- > db.addUser('myuser', 'superpassword')
- { "n" : 0, "connectionId" : 2, "err" : null, "ok" : 1 }
- {
- "user" : "myuser",
- "readOnly" : false,
- "pwd" : "ecb2c08916b34e477c33c10cec2ae416",
- "_id" : ObjectId("512c6d9dcc5d103a896944ae")
- }
- > db.testcollection.find()
- { "_id" : ObjectId("512c6d85cc5d103a896944ad"), "message" : "Hello, remote user!" }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement