Recently want to know about MongoDB knowledge, remember before the computer installed MongoDB can also be enabled, but this time in the use of MongoDB, but encountered a little trouble ah. MongoDB can not start, small series is very distressed, try a variety of methods, even uninstall reinstall can not solve, but since to experience me, then greet it.
First of all, the reason for this error: Using the bat configuration can be started, is the following way
>c:
>CD C:\MongoDB\Server\bin
>mongod--dbpath C:\MongoDB\data
Error
But this start trouble ah, want to add directly to the service, can add, but after the addition of how can not be started, whether in DOS or services directly start, all kinds of not smooth, but use bat configuration can still start normally, you say irritating not, not just want to save something! Why are you so people! The error is the true figure as follows
On this issue, in fact, a search has a lot of answers, but not for the small part of the works! But the small part is also to the wrong reason mainly because the MongoDB service does not shut down properly, causing the startup difficulty.
Solution Solutions
But fortunately, finally find a solution to the problem ah. O (∩_∩) o haha ~
In the MongoDB installation path, there are two files in the data file a mongod.lock and Storage.bson, generally delete mongod.lock on it, if the service error code 100 can not be resolved, the Storage.bson together with the deletion of the start can be!
Suggestions:
After installing MongoDB, you can use the bat configuration to test whether the installation is successful, if the installation is successful, if you want to add to the service, the data in the test installation because of the success of the files are deleted, and then directly using the statement to add the service, so as to avoid the abnormal shutdown caused by the error.
Summarize
Believe that there is no problem can not be solved, but the length of time problem! fighting!
MONGODB Create Windows service startup fix