How to start MongoDB as a windows Service, mongodbwindows Service

Source: Internet
Author: User

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!


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.