无法使用shell在heroku连接到mongohq [英] Unable to connect to mongohq at heroku using shell
问题描述
我在Heroku上安装了 mongohq:sandbox
。当我想连接到mongo时,发生错误:
mongo linus.mongohq.com:10123/app10575123 -u my_user -p pwd123
MongoDB shell版本:2.2.2
连接到:linus.mongohq.com:10123/app10575123
> show dbs
Wed Jan 9 06:00:50未捕获异常:listDatabases失败:{errmsg:需要登录,ok:0}
登录名和密码正确。 到MongoHQ的共享数据库计划(特别是沙箱),出于安全原因,它们不包括对Mongo实例的管理级访问......只能访问您的实际数据库。
show dbs是一个管理员级别的命令,在这种情况下,它将在沙盒MongoDB进程中显示其他数据库。
相反,您需要使用以下命令: ..等等。 我希望这有助于! I installed Login and password are correct. You are connected to the database, but for the shared database plans at MongoHQ (especially the sandbox ones), for security reasons, they do not include admin-level access to the Mongo instance ... only access to your actual database. "show dbs" is an admin-level command and, in this case, would show other databases on that sandbox MongoDB process. Instead, you will want to use commands like: ... and so on. I hope this helps! 这篇关于无法使用shell在heroku连接到mongohq的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
mongohq:sandbox
at Heroku. When I want to connect to mongo, it occurs an error:mongo linus.mongohq.com:10123/app10575123 -u my_user -p pwd123
MongoDB shell version: 2.2.2
connecting to: linus.mongohq.com:10123/app10575123
> show dbs
Wed Jan 9 06:00:50 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }