After mongoDB has configured the environment variables, what is the reason why the mongo command cannot be used to connect?

  mongodb, question

This is an error message:
clipboard.png

Environment variable configuration succeeded:

clipboard.png

Service started successfully:

clipboard.png

You have to use it to connect successfully. It is useless to match environment variables. What is the reason?

mongod.exe --dbpath "e:\mongoDB\data"

See if MongoDB service has started. Found this problem, Windows service registration was successful, but it could not be started. MongoDB needs to be started manually every time. Since there are already environment variables, the command to start MongoDB can be written as a batch in the development phase.