Solution to system error when installing mongodb

win10 environment installation

Error one:

发生系统错误 5。

拒绝访问。

Solution:

If the above error message appears, it means that there is no execution permission. Requires administrator privileges to execute the command

Error two:

发生系统错误 2。

系统找不到指定的文件

Solution:

If the above error message appears, if you have installed it once before, and the two installation directories are different, you will definitely encounter it, because the path you installed before has been generated in the registry and has not been cleared with your uninstallation .

View method win+R--->regedit--->Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MongoDB--->imagepath--->Right click【Modify】

Duang! Duang! Duang! I did not repeat the installation, but the path containing Chinese in the registry does not display Chinese, but garbled characters, I have modified it. [Hint, it is best not to use Chinese when creating a directory]

At the same time, execute SC DELETE MONGO in the terminal, and then execute mongod.exe --dbpath " d:\MongoDB\data\db " --logpath " d:\MongoDB\data\db\db.log " --install --serviceName "mongo" --logappend --directoryperdb.

Guess you like

Origin blog.csdn.net/weixin_43124425/article/details/105713278