mongo exception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating

原因是,mongod默认启动dbpath为/data/db,本机没有这个目录

解决方法:创建一个db目录,并添加到mongod启动参数

mkdir /root/.local/share/mongo/db
mongod --dbpath /root/.local/share/mongo/db

,

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享
评论 抢沙发
区块链技术的头像-区块链开发网

昵称

取消
昵称表情代码图片