Linux学习MongoDB第一天,启动就报错
[root@localhost mongodb]# mongod --port=27017 --logpath=./log --dbpath=./db --fork
about to fork child process, waiting until server is ready for connections.
forked process: 2454
ERROR: child process failed, exited with 100
To see additional information in this output, start without the "--fork" option.
这个报错码是100,原因是没创建dbpath的文件夹,在dbpath的位置把文件夹创建出来就可以了
[root@localhost mongodb]# mkdir db log
[root@localhost mongodb]# mongod --port=27017 --logpath=./log/mongodb.log --dbpath=./db --fork
about to fork child process, waiting until server is ready for connections.
forked process: 3429
child process started successfully, parent exiting
在学习Linux环境下使用MongoDB时遇到了启动问题,错误代码为100。原因是未创建指定的dbpath目录。通过在dbpath位置创建所需文件夹,如`mkdir dblog`,成功解决了问题并顺利启动了MongoDB服务。确保在启动命令中指定正确的参数,如`mongod --port=27017 --logpath=./log/mongodb.log --dbpath=./db --fork`。
7669

被折叠的 条评论
为什么被折叠?



