首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我只能从MongoDB外壳的目录启动,但不能全局启动

我只能从MongoDB外壳的目录启动,但不能全局启动
EN

Stack Overflow用户
提问于 2021-07-02 15:29:31
回答 1查看 20关注 0票数 0

正如文档所说,我必须在我的shell中编写Mongo才能运行Mongo shell。然而,它不会工作!

另一方面,如果我进入它的目录(program-files/mongoDB/Server/4.4/Bin)并输入.\mongo,它就会打开并工作!

有没有一种方法可以让我在任何目录中使用它?我经常在文件之间移动来使用它,它变得非常烦人。我已经尝试运行npm i -g mongo,但是什么也没做。

谢谢!!

translated from Spanish:mongo: The term 'mongo' is not recognized as the name of a cmdlet, function, script file, or executable program. Check if you entered the name correctly or, if you included a path, check that the path is correct and try again.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-07-02 17:09:21

您需要在环境变量中添加mongoDB的路径。请访问以下链接以了解更多信息:

https://dangphongvanthanh.wordpress.com/2017/06/12/add-mongos-bin-folder-to-the-path-environment-variable/

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68221221

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档