无法使用Mongo show命令,得到'show:command not found'错误

时间:2016-06-21 17:33:36

标签: mongodb

我运行Mongo但不能使用mongo命令。当我输入show collections时,我收到错误show: command not found。我该如何解决这个问题?

我使用自制软件安装,因此我的mongo安装位于:/usr/local/Cellar/mongodb/3.0.6,我的数据库位于/data /db

(我搜索过但找不到答案。以下内容没有帮助:cant use mongo command, shows command not found on mac

1 个答案:

答案 0 :(得分:1)

哦,哈哈。我必须打开Mongo shell(通过在终端中输入mongo)而不是像我之前那样使用mongod启动数据库。好吧那么......我的问题就解决了。