Windows installation MongoDB progress bar stuck, window installed MONGO system error 2, system error 5 workaround

Source: Internet
Author: User
Tags mongodb windows

Windows installation MongoDB

First go to the official website (https://www.mongodb.com/download-center?jmp=nav#community) and download a MongoDB Windows client.

I downloaded two versions of the 3.4.11 version, one is 3.6.2.

Originally used MongoDB with Springboot learning, so first choose the latest version, but the installation of stuck, stuck in the compass

Workaround:

1. Wait half an hour, or longer. (http://blog.csdn.net/only_yu_yy/article/details/78884834)

1. When installing the custom installation, the installation is to cancel the install MONGO Compass (in the lower left corner).

2. Do not install 3.6, install 3.4.

Installed a 3.4

Windows configuration MongoDB

Configure environment variables.

1.path Add:

D:\software\mongodb\Server\3.4\ Bin

(See the address you installed)

2. Create a two folder

E:\mongodb\data  
E:\mongodb\data\logs

3. Create a service

CD D:\software\mongodb\Server\3.4\ Bin

(Remember to CD to this path to execute the next statement, otherwise the following steps will be error)

Mongod--dbpath=e:\mongodb\data--logpath=e:\mongodb\logs\mongodb.log--install  "MongoDB " --logappend--directoryperdb

4. Start the service

net start MongoDB

5. Visit http://localhost:27017 the following appears.

    • If the following conditions occur (2018-02-06t21:20:47.814+0800 F CONTROL [main] Failed global initialization:FileNotOpen:Failed to open "E:\mong Odb\logs\mongodb.log ")

No folder created, or create a problem, return to step 2

System error 5 occurs if the following conditions occur (net start MongoDB). Access denied. )

To run CMD as an administrator, execute this command.

System error 2 occurs if the following condition occurs (>net start MongoDB). The system cannot find the file specified. . )

is not executed under an absolute path, or it may be a dirty unload

Mongod--dbpath=e:\mongodb\data--logpath=e:\mongodb\logs\mongodb.log--install  "MongoDB " --logappend--directoryperdb

Needs to be deleted first

" MongoDB "

Then go back to step 3 and re-execute.

Finally, it's OK.

Windows installation MongoDB progress bar stuck, window installed MONGO system error 2, system error 5 workaround

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.