Installing MongoDB's blood-vomiting experience under Windows 10

Source: Internet
Author: User
Tags mongodb mongodb server

When installing some software, often because of various permissions restrictions, resulting in installation failure or a bug, such as MongoDB, I finally installed with PowerShell, the success did not appear bug, or there will be

Service ' MongoDB server ' failed to start verify the sufficient privileges to start system services
Such a problem!  The procedure for installing with Powersheel is as follows, if you are in Win10, right-click on the Start menu in the lower left corner and click on the "Windows PowerShell (Administrator)" option to open an administrator command line mode that is higher than the CMD permission, and then enter the absolute path of the file directly: Then all the way next can be installed successfully, as to choose the default installation path, or custom (customized), whatever you, if you suspect the default path "C:\Programme files\mongodb\server\4.0" too long, you can also change to "C \ MongoDB "or D, f disk and other places. In fact, the path is not related to the long point, because you can add "[Installed Path]\bin" in the system environment variable to subtract the subsequent input path in the command line trouble. In fact, after the MongoDB service is set to boot, the call to MongoDB in Python does not require any settings, so it is really not necessary to shorten the path, after all, your data is in the database directory, Therefore, the data directory on the C-drive or D-disk root directory in the subsequent use to bring convenience. Here's how to set up boot-up:
#mongod--dbpath=[dbpath]--logpath=[logpath]--install--servicename= "MongoDB" #比如, if you set DBPath for C:\data\db, LogPath is C:\data\log\MongoDB.log, you can enter: Mongod--dbpath=c:\data\db--logpath=c:\data\log\mongodb.log--install-- Servicename= "MongoDB" #其中, when you enter a path on the command line, in the form of a string, especially when you enter several paths side by side, such as creating two files in the same directory: MD "file_1" "C:\xxx\file_2" #此外, Using spaces in the command line is equivalent to using an equal sign, so the command line can be written as well; Mongod--dbpath "C:\data\db"--logpath "C:\data\log\MongoDB.log"--install--servicename "MongoDB"

  

Installing MongoDB's blood-spitting experience under Windows 10

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.