The MongoDB service started successfully, but failed to connect to the database

the MongoDB service started successfully, but failed to connect to the database

according to the error message, it is said that the data directory was not found, but I configured the cfg file to point the data directory to another folder,

I think it is possible that when connecting to the database, I did not enter my cfg file at all. I would like to ask you how to solve this problem.

Thank you



Apr.07,2021

stop other services, and the command startup command is' mongo' typed incorrectly;

Menu