MongoDB一直显示
Unrecognized option: storage
try ‘mongod --help’ for more information
意思是我们配置的config文件出了问题。
说明:MongoDB采用的是YAML格式,所以我们只需要稍微改改就好。
在storage:下面的两行最前面输入两个空格。
我刚开始这三行都是没有空格的,实际应该在下面两行最前面输入两个空格。
成功之后的config文件:
storage:
#The directory where the mongod instance stores its data.Default Value is "\data\db" on Windows.
dbPath: D:\Download\mongodb-win32-x86_64-2008plus-ssl-4.0.12\data\db
关注我,在技术道路上少走些弯路。
本文指导读者解决MongoDB配置文件中Unrecognized option: storage的问题,通过修正YAML格式中的空格问题,确保dbPath设置正确。避免技术困扰,提升配置效率。
1万+





