Download files
Address: www.mongodb.com/download-ce…
Second, the installation
After downloading the file, open Access, double-click the decompression and rename the decompressed folder to mongodb
Go to → Go to folder to find the mongodb installation directory
Open terminal and type: mongod –dbpath (with a space at the end, do not enter)
Then drag the newly created folder into the terminal, the folder path automatically appear enter
Four, open a new terminal, enter: mongo enter database link
To check whether the connection is successful, run show DBS to list all databases with data
5, when closing the database connection, be sure to enter the following two commands
use admin
db.shutdownServer()
If you do not run the preceding command, an error may occur during the next database startup