配置好config文件,命令行输入以下命令
mongod --config C:\MongoDB\Server\3.2\mongod.cfg --directoryperdb --serviceName MongoDB --intall
这里加入 directoryperdb 后,启动服务后,一直报错,启动服务失败,错误码100
后经过查看log日志,发现错误信息如下:
72 Requested option conflicts with current storage engine option for directoryPerDB;
you requested true but the current server storage is already set to false and
cannot be changed, terminating
-
解决方案
1. 先remove 掉原有的服务
~/bin mongod --remove
2. 去掉--directoryperdb
mongod --config C:\MongoDB\Server\3.2\mongod.cfg --serviceName MongoDB --intall
3. 再次运行,发现问题解决
问题参考链接
网友评论