1. Prepare two shell windows, one as the server and one as the client
2. Launch an unlicensed MONGO instance in the server window using the instruction
Mongod--dbpath Local Database storage location--bind_ip MONGO bound IP--port Port--journal
3. MONGO instance that was just started on the client connection
MONGO server-bound IP: Port/admin
4. Add an Administrator account
Db.createuser ({'user':' username ' 'pwd' ' password '"root" })
5. Client exit
Exit
6. Close the service side
CTRL + C
7. Create a MONGO server configuration file
Touch configuration file location
8. Start the MONGO service with a file
Mongod-f Configuration file Location
9. Connect to the MONGO test on the client
MONGO--host MONGO binding IP--port Port-u user name-p password database name
Appendix:
1) Create db
Connect MONGO with an administrator account
Creating databases and Managing users
use database name Db.createuser ({'user':' username ') pwd ' ' Password ' " ReadWrite " " DbAdmin " ] })
2) configuration file description (Official document)
https://docs.mongodb.org/v3.0/reference/configuration-options/
Creating MONGO instances on Linux