1

I know this is a very common question for MongoDB, but I really tried most of the answers, but could not solve this issue. So I feel I'm missing something Somewhere

Here are the steps:

  1. Downloaded latest version 3.03 of MongoDB.
  2. Custom installed to f:\MEAN\MongoDB.
  3. F:\MEAN>sc.exe create MongoDBSvc binPath= "\"F:\mean\mongodb

\bin\mongod.exe\" -- service --config=\"F:\MEAN\MongoDBData\log\1.cfg\"" DisplayName= "MongoDBSvc" start= "auto" [SC] CreateService SUCCESS

F:\MEAN>net start MongoDbSvc

The MongoDBSvc service is starting. The MongoDBSvc service was started successfully.

F:\MEAN>mongo

MongoDB shell version: 3.0.3 connecting to: test

  > view dbs
   2015-05-28T14:00:10.907+1000 E QUERY    SyntaxError: Unexpected      identifier
 > show dbs
    2015-05-28T14:00:21.886+1000 E QUERY    Error: listDatabases failed:{
    "ok" : 0,
    "errmsg" : "not authorized on admin to execute command {  listDatabases:
     1.0 }",
           "code" : 13
   }
       at Error (<anonymous>)
       at Mongo.getDBs (src/mongo/shell/mongo.js:47:15)
       at shellHelper.show (src/mongo/shell/utils.js:630:33)
       at shellHelper (src/mongo/shell/utils.js:524:36)
       at (shellhelp2):1:1 at src/mongo/shell/mongo.js:47
     > ^C
          bye
Dev
  • 13,492
  • 19
  • 81
  • 174
georgian98
  • 85
  • 8
  • It would be helpful to tell us what you tried already. If you tried most of the answers, why didn't you give the remaining answers a try? Am I right that you have authentication enabled? – philnate May 28 '15 at 05:09
  • To me it looks like the dbAdmin has no right to list Databases: http://docs.mongodb.org/manual/reference/built-in-roles/#dbAdmin . See this answer: http://stackoverflow.com/a/23945653/1377224 – philnate May 28 '15 at 05:18
  • I'm new to MongoDB and just want to get started so that I can try learn more, I'm not sure if Authentication is enabled and how to do it. and this issue is holding me back. I cant even see the list of database leave alone creating collections and insert data. – georgian98 May 28 '15 at 07:05
  • Please add to your question the content of F:\MEAN\MongoDBData\log\1.cfg . And btw, putting your config in log folder might not be the best decision. – philnate May 28 '15 at 07:20
  • I tried same settings/ config on my laptop with win7 and every thing worked for me on very first attempt. By the way I'm sorry that I've mentioned before that I'm trying to install on Win 8.1. – georgian98 May 28 '15 at 23:15
  • Well, I've no idea then. Maybe you should try to ask directly mongodb for support about it. – philnate May 30 '15 at 19:48

0 Answers0