Guest User

Untitled

a guest
Apr 4th, 2018
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. VK360@VK360:~$ mongoimport --db cstore --collection stores --drop --file /home/kuliza360/Desktop/Office/Cstoredemo/my_data.json
  2. 2018-04-04T10:37:41.545+0530 connected to: localhost
  3. 2018-04-04T10:37:41.545+0530 dropping: cstore.stores
  4. 2018-04-04T10:37:41.545+0530 Failed: not authorized on cstore to execute command { drop: "stores" }
  5. 2018-04-04T10:37:41.545+0530 imported 0 documents
  6.  
  7. use admin
  8. db.createUser(
  9. {
  10. user: "admin",
  11. pwd: "password",
  12. roles: [ { role: "root", db: "admin" } ]
  13. }
  14. );
  15. exit;
  16.  
  17. 2018-04-04T10:33:58.124+0530 E QUERY [thread1] Error: couldn't add user: not authorized on admin to execute command { createUser: "admin", pwd: "xxx", roles: [ { role: "root", db: "admin" } ], digestPassword: false, writeConcern: { w: "majority", wtimeout: 60000.0 } } :
  18. _getErrorWithCode@src/mongo/shell/utils.js:25:13
  19. DB.prototype.createUser@src/mongo/shell/db.js:1267:15
  20. @(shell):1:1
Add Comment
Please, Sign In to add comment