Title, this problem also Baidu for a long time, Baidu is still quite to force, but did not solve the problem, later in the Great God (forgive I do not know what the great God called) under the guidance, finally set a successful, special sharing under the setup process.
MongoDB setting up the database I will not say ... Amount: Forget, or tidy up, oneself also review again. Since I am downloading the installation package, EXE is installed directly:
1. After the installation is complete, my default installation is under C:\Program Files\mongodb, the full path of the bin directory is C:\Program Files\mongodb\server\3.2\bin (to be used later)
2. Open cmd (normal Open or administrator open can), enter the command CD C:\Program files\mongodb\server\3.2\bin into the bin directory
3. Continue to enter command Mongod--dbpath=d:/data/db (d:/data/db is the location of the database file I specified, of course, the default is c:/data/db)
4. If the former is the administrator of the CMD, then continue, or re-open the administrator status of CMD, if you already have a service name, such as MongoDB, then first delete this, SC delete MongoDB
5. Then re-enter the second section of the folder, enter the command mongod--logpath d:\data\log\MongoDB.log--logappend--dbpath d:\data\db--directoryperdb-- ServiceName MongoDB--install
6. Continue to enter directive net start MongoDB (MongoDB This is the fifth step of the specified service name)
Well, there may be some problems here: for example:
Requested option conflicts with current storage engine option for DIRECTORYPERDB; You requested true if the current server storage are already set to false and cannot be changed, terminating
This error is viewed in the log file set in D:\data\log\MongoDB.log, which is the fifth step. Baidu has no answer to this question.
The method of modification is: Pay attention to the sixth step of a word "directoryperdb", yes, remove. Then the command becomes Mongod--logpath d:\data\log\MongoDB.log--logappend--dbpath d:\data\db--servicename MongoDB--install this.
Then proceed to the sixth step (involving the removal of services, refer to step Fourth)
If there is a problem. The amount ... Cheers to discuss together. I was just touching ...
Setting up a MongoDB server as a Windows Startup service (WIN10)