当前位置:   article > 正文

mongodb启动报错:mongodb error:NonExistentPath: Data directory /data/db not found._exception in initandlisten: nonexistentpath: data

exception in initandlisten: nonexistentpath: data directory /data/db not fou

错误信息

{“t”:{“$date”:“2021-11-10T08:18:57.122+08:00”},“s”:“E”, “c”:“CONTROL”, “id”:20557, “ctx”:“initandlisten”,“msg”:“DBException in initAndListen, terminating”,“attr”:{“error”:“NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the ‘storage.dbPath’ option in the configuration file.”}}
其中 NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the ‘storage.dbPath’ option in the configuration file.
告诉我们。没有找到 /data/db 目录 让我们用 --dbpath指定目录启动 或者添加 storage.dbPath 指定目录

在这里插入图片描述

使用 --dbpath启动

./mongod --dbpath /usr/local/src/mongodb/mongodb/data
  • 1

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/56121
推荐阅读
相关标签
  

闽ICP备14008679号