The "former record" has recently been modified by the company system, borrowing the memory library to achieve rapid response. The company borrows the MongoDB database. Here is the note to learn to organize
From Start & Close, it's too easy to install.
MongoDB Server startup (a bit similar to the PostgreSQL database startup method): Use the Mongod command. As for the start parameter, you can use Mongod--help. Mongod common parameters are as follows:--dbpath: Specifies the data directory. such as E:\mongodb\date\db. To determine whether the directory exists or not, create it. Otherwise, the directory will be reported at startup without errors. --port: Specifies the port. The default is 27017. If the port is occupied by another process. Use this parameter to reassign the port to it. In the server cluster--logpath: Specify the log file. --config: Configuration file. Equivalent to-f
- General Startup
>mongod--dbpath E:\mongodb\date\db--port 5566--logpath e:\mongodb\date\db\mongodb.log# Data directory for E:\MONGODB\DATE\DB ; Port: 5566 |
2. Start with a configuration file. Create a new configuration file (mongodb.conf)
DBPath = E:\mongodb\date\db#port = 5566--note borrowing #logpath =e:\mongodb\date\db\mongodb.log |
Start the server
>mongod--config E:\mongodb\date\db\mongodb.conf #其中的--config can be replaced with-F. |
This way to start a high-end atmosphere than the previous point bar.
Check if startup is successful
1. Ctrl + C way rough, simple, fast 2. Command mode
Use admin; #只有admin用户才有权限. Use username. is the command to switch users. Db.shutdown.server (); |
3. Kill the Process
Ps-ef | grep Mongodb;kill PS |
This is a simple way. But not safe. If the data is being written at that time, it will result in data loss.
1. MongoDB Start & Close