Mongod --dbpath /data/db --fork --logpath /data/db/mongodb.log

ERROR: child process failed, exited with 1

#even after I had created /data/db manually and change permission to 777.

Check mongodb.log
The switch/flag preceding each parameter should be double hypen
May be it ignored those params and trying to start mongod on default port/dbpath but you may be already have a running instance there

Hi @Ren_Song,
Have you disabled SElinux?
Is the dbpath consistent with the one in the configuration file?

Best Regards

It is still a directory permission issue. I have already got it resolved. Thank you!

It is not about SElinux. Thank you for giving me a chance to learn about SElinux!

1 Like

It is not about hypen. It is still a directory permission issue. Thank you for trying to help!