question
The last window of mongod entered in the bin directory of the mongodb installation directory in cmd is closed
Solution
1.data file
After MongoDB is installed, create a data folder in the root directory of MongoDB, and then create a db folder in the data folder
2. Enter the command
Enter mongod.exe --dbpath D:\MongoDB\data
D:\MongoDB\data (represents your storage location, here is my location) in cmd and
open the cmd command again and enter mongo