在腾讯云centos中运行mongodb报错:
about to fork child process, waiting until server is ready for connections.
forked process: 790
ERROR: child process failed, exited with error number 48
To see additional information in this output, start without the "--fork" option.
换成这样 ./bin/mongod
可以看到mongodb在哪些端口运行
然后用npx kill-port 2349杀死在运行的端口
在重新启动
sudo /usr/local/mongodb/bin/mongod --dbpath=/var/mongodb/data --logpath /var/mongodb/logs/log.log -fork
mongo进入mongodb命令行