Insert in MongoLab (mongo shell) remotely - my PC is win 7 64bit but stuck in this error below

Inserting New Data in p. 93 of the book by Sitepoint MEAN Stack
FULL STACK JAVASCRIPT DEVELOPMENT WITH MEAN BY ADAM BRETZ
insert in MongoLab (mongo shell) remotely - my PC is win 7 64bit but stuck in this error below… can you debug error - shell error?

rs-ds031611:PRIMARY> db
presidents
rs-ds031611:PRIMARY> db.people.insert({name: 'Bill Clinton'})
WriteResult({
        "writeError" : {
                "code" : 13,
                "errmsg" : "not authorized on presidents to execute command { in
sert: \"people\", documents: [ { _id: ObjectId('54ba7e9d271d775ad2e1b638'), name
: \"Bill Clinton\" } ], ordered: true }"
        }
})
rs-ds031611:PRIMARY>

problen solved - was using git shell

switched to CLI WINDOWS AS ADMIN and worked…!!!

Qs

  1. deleting a collection deletes all databases in it? in other words databases are inside collections in mongodb?
  2. how run git shell in win 7 as admin?

errata

book mentioned here : missing source code for ch.9 mongo in book’s app.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.