Advertisement
Welton

Untitled

Aug 29th, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. user@ubuntu:/$ mongo
  2. MongoDB shell version: 2.2.3
  3. connecting to: test
  4. > use mytest
  5. switched to db mytest
  6. > db.testcollection.insert({"message":"Hello, remote user!"})
  7. > db.addUser('myuser', 'superpassword')
  8. { "n" : 0, "connectionId" : 2, "err" : null, "ok" : 1 }
  9. {
  10. "user" : "myuser",
  11. "readOnly" : false,
  12. "pwd" : "ecb2c08916b34e477c33c10cec2ae416",
  13. "_id" : ObjectId("512c6d9dcc5d103a896944ae")
  14. }
  15. > db.testcollection.find()
  16. { "_id" : ObjectId("512c6d85cc5d103a896944ad"), "message" : "Hello, remote user!" }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement