mongo不是内部命令

问题遇到的现象和发生背景

mongo不是内部命令

问题相关代码,请勿粘贴截图

mongo

运行结果及报错内容

mongo : The term 'mongo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

我的解答思路和尝试过的方法

环境变量设置了,但是只能用mongod

我想要达到的结果

运行mongo在命令行使用数据库

可以直接从mongodb下bin目录那里直接cmd,然后直接输入mongo,就可以进入了

进入你放置mongodb下的bin目录,按住shift键点击右键,选择1在此处打开power shell窗口。在power shell窗口执行命令即可

img