启动mongodb后,在web端口访问情况下,点击List all commands会出现如下错误
REST is not enabled. use --rest to turn on.
check that port 28017 is secured for the network too.
check that port 28017 is secured for the network too.
原因是rest未启动,现在给出windows下的解决方案
以命令行启动的在命令行键入
--rest
具体如下
切换到mongo.ext文件所在目录如D:\mongodb\bin
之后点击List all commands出现
配置文件启动
内容如下
#start MongoDB
port=27017
dbpath = "D:\mongodb\db"
logpath = "D:\mongodb\db\log\MongoDB.log"
rest = true
加上rest=true即可