1. MongoDB database official website download address
- Download address: https://www.mongodb.com/try/download
download the community version
2. Configure environment variables
3. Turn on the service
- Open cmd command window
- Enter the command mongod
- Enter the command mongo
四.Error: Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), Connection refused
1. Data file
After MongoDB is installed, create a data folder in the MongoDB root directory, and then create a db folder in the data folder. An
error occurred when starting the service. Refer to the following blog post to solve the problem
. 2. Enter the command and
enter mongod in cmd .exe --dbpath D:\MongoDB\data
D:\MongoDB\data (representing the location where you want to store it, here is my location)
Open the cmd command again and enter mongo
Five. Reference
https://blog.csdn.net/muguli2008/article/details/80591256
https://blog.csdn.net/weixin_44422604/article/details/107009615
https://blog.csdn.net/weixin_45664911/article/details/106119748