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:
- Downloaded latest version 3.03 of MongoDB.
- Custom installed to f:\MEAN\MongoDB.
- 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