我运行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)
答案 0 :(得分:1)
哦,哈哈。我必须打开Mongo shell(通过在终端中输入mongo
)而不是像我之前那样使用mongod
启动数据库。好吧那么......我的问题就解决了。