无法在Windows 7上将mongodb添加到PATH变量

时间:2017-02-06 21:34:51

标签: windows mongodb path

我尝试在我的Windows 7 latop上添加mongodb程序来运行我正在处理的一些程序。

我将mongodb路径添加到系统属性/高级中的Windows PATH变量的末尾。这就是我所拥有的:

C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\RSA SecurID Token Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Dell\Dell Data Protection\Encryption\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\tdunphy\bin;C:\Python27;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Python27\Scripts;C:\Users\tdunphy\bin\;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Skype\Phone;C:\Program Files\MongoDB\Server\3.4\bin

当我尝试运行mongo程序时,这就是我得到的:

mongod' is not recognized as an internal or external command,

可操作程序或批处理文件。

mongo
'mongo' is not recognized as an internal or external command,
operable program or batch file.

我做错了什么?

1 个答案:

答案 0 :(得分:0)

我刚才面临同样的情况。我所做的是备份我的PATH变量并在那里只放置MongoDB路径。重新启动CLI,它工作正常。然后我添加了删除的路径。不知道为什么会这样。

顺便说一下,' mongodb'根据你的要求,它不会起作用,它是mongo或mongod。

相关问题