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

阳光穿透心脏的1/2处 2024-03-22 14:18 198阅读 0赞

错误信息

{“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启动

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

在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,198人围观)

还没有评论,来说两句吧...

相关阅读