启动mongodb时
已解决 exception in initAndListen: 29 Data directory /data/db not found., terminating
原因:

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

解决方法:

1、创建一个db目录

sudo mkdir /data

sudo mkdir /data/db

2、更改文件夹读写权限

sudo chmod 777 data/db

重新在/bin目录启动

启动成功后最后一行应该是端口号 如图

已解决 exception in initAndListen: 29 Data directory /data/db not found., terminating

相关文章:

  • 2021-04-09
  • 2021-06-16
  • 2022-12-23
  • 2022-01-21
  • 2021-05-10
  • 2022-12-23
  • 2021-05-17
  • 2021-10-11
猜你喜欢
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
相关资源
相似解决方案