How to start MongoDB as a windows Service, mongodbwindows Service
MongoDB is used in recent projects. It is very troublesome to run commands in cmd every time you start the system. Although these commands can be written as bat scripts, this window can be easily closed, causing service to stop. Therefore, the safest way is to register it as a service.
I checked a lot of methods from the Internet, but there are various problems,
Some blogs write this way.
E: \ APMServ5.2.6 \ MongoDb \ bin> mongod -- logpath E: \ APMServ5.2.6 \ MongoDb \ logs \ MongoDB. log -- logappend -- dbpath E: \ APMServ5.2.6 \ MongoDb \ data -- directoryperdb -- serviceName MongoDB -- install
Press enter to check whether the service is successfully installed.
All output going to: E: \ APMServ5.2.6 \ MongoDb \ logs \ MongoDB. log
Creating service MongoDB.
Service creation successful.
Service can be started from the command line via 'net start "MongoDB "'.
However, I have never succeeded. If I enable it with a command, it will show that it has been enabled successfully, or that it has been disabled successfully. If I open the Service Manager, I can also see that it has been started successfully, but it cannot be used, mongo cannot be connected.
Finally found the release method on the official website: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/
However, there is still a problem until the blog is published, that is, a 109 error will be reported when it is disabled. The Web site says there is a problem with the configuration, but no specific cause is found.
We now need to use mongo to manage some audio, video, and image files, but we don't know how to save them. Whether to store the files directly or the path, please let me know a demo or idea, grateful!