我知道这是MongoDB的一个非常常见的问题,但我真的尝试了大部分答案,但无法解决这个问题。 所以我觉得我错过了某个地方
以下是步骤:
\ bin \ mongod.exe \“ - service --config = \”F:\ MEAN \ MongoDBData \ log \ 1.cfg \“” DisplayName =“MongoDBSvc”start =“auto” [SC] CreateService SUCCESS
F:\MEAN>net start MongoDbSvc
MongoDBSvc服务正在启动。 MongoDBSvc服务已成功启动。
F:\MEAN>mongo
MongoDB shell版本:3.0.3连接到: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