1

I worked on a MEAN example quite a while back, but when I returned to testing something again, Mongo is giving me issues about authorization.

(All these commands are executed on Windows cmd - when run as an Administrator)

I have done the following :

  • mongod --noauth // to run mongo server

  • mongo --shell // started client

Now, in mongo --shell:

  • use admin
  • switched to db admin

  • show dbs

  • 2014 - 11 - 13 T13: 25: 36.747 - 0500 listDatabases failed: { "ok": 0, "errmsg": "not authorized on admin to execute command { listDatabases: 1.0 }", "code": 13 } at src / mongo / shell / mongo.js: 47

I get the above error. I tried a lot of config changes (e.g.: run mongod with auth: mongod --config=<filePath>), deleted all my data from my local mongo instance, and started all over again.

I was wondering if I could get some help regarding this.

All I need to do is run Mongo without authentication, and be able to create collections etc, to play around with it.

I have looked into the Mongodb Documentation, but I find it confusing, I tried googling, but in vain because, all answers/references point to the Mongo-docs.

Honestly, I was having a hard time, figuring out the docs.

HeshMap
  • 31
  • 4

1 Answers1

2

Wow, I really can't believe this.

There was a separate instance of meanstack-service running in the background. I investigated the processes in the services.msc, and Terminated it on sight.

I am quite glad that, now mongo seems to be working.

HeshMap
  • 31
  • 4