meteor部署之后接收到命令mongo --url http:// <sitename> .meteor.com /尝试连接到网址连接robomongo </sitename>

时间:2015-03-18 09:18:29

标签: mongodb meteor

我运行meteor deploy sitename:没关系

然后我想连接到robomongo的数据库,所以我运行命令: mongo --url http://sitename.meteor.com/

我收到了这种类型的网址:

mongodb://client-d7a066d2:8c9b29f5-180e-d57a-3ba7-1b2037c2aeb1@production-db-d1.meteor.io:27017/libreboardandy_meteor_com 这个地址在一分钟内有效。

在Robomongo中,我开始一个新的连接,给出一个名字并粘贴网址。

然后我点击连接按钮。

但我有错误信息......

Cannot connect to MongoD ....

任何帮助?

由于

2 个答案:

答案 0 :(得分:0)

所以尝试使用 mongo -U 命令;

meteor mongo -U sitename.meteor.com
// mongodb://username:password@production-db-d1.meteor.io:27017/database_name

<强>: 客户d7a066d2:8c9b29f5-180e-d57a-3ba7-1b2037c2aeb1

enter image description here

设置用户名和密码

enter image description here

确定点击测试。

答案 1 :(得分:-1)

  1. 转到本地环境中的项目文件夹(例如OSX中的终端)
  2. 输入meteor mongo --url YOURDEPLOYEDAPP.meteor.com
  3.   

    你会得到这样的东西:

         

    mongodb://client-49e5fcc0:d3d4c092-adc9-4966-57a9-a321caaa6415@production-db-d2.meteor.io:27017/yourdeployedapp_meteor_com

    该mongodb网址按以下顺序包含:

    mongodb://username:password@server-address:port/database_name
    
    1. 现在在Robomongo(或您的本地数据库客户端)中,使用此信息创建一个新连接,如此屏幕截图: Connection settings for Robomongo DB client connecting to a MongoDB Server hosted by Meteor
    2. Robomongo client on OX connected to remote MongoDB on Meteor