在2016年访问流星生产数据库 [英] Accessing meteor production database in 2016

查看:54
本文介绍了在2016年访问流星生产数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎该线程中的答案(访问Meteor生产数据库)不再起作用当您想在2016年访问流星生产数据库时.我想使用

It seems the answer in this thread (Accessing Meteor production database) does not work anymore when you want to access a meteor production database in 2016. I want to access a meteor production database blah.meteor.com using

流星mongo blah.meteor.com

meteor mongo blah.meteor.com

相反,我得到的是:

连接到:sg-mother1-6243.servers.mongodirector.com:27017/blah_meteor_com 2016-01-18T15:21:49.884 + 0200错误:18 {正常:0.0,errmsg:身份验证失败",代码:18} at src/mongo/shell/db.js:1210 例外:登录失败

connecting to: sg-mother1-6243.servers.mongodirector.com:27017/blah_meteor_com 2016-01-18T15:21:49.884+0200 Error: 18 { ok: 0.0, errmsg: "auth failed", code: 18 } at src/mongo/shell/db.js:1210 exception: login failed

然后我尝试了

流星mongo --url blah.meteor.com

meteor mongo --url blah.meteor.com

我得到用户名光标.我输入流星站点的用户名,然后按Enter,然后获取密码光标.我输入上述用户名的密码,然后按Enter.我看到以下网址:

I get username cursor. I enter my meteor site username and press enter and then get password cursor. I enter password for the above username and press enter. I get presented with the following url:

mongodb://client-2ee8c14d:c1546ca8-4e7e-5883-0214-150b309fb4fb@SG-mother1-6242.servers.mongodirector.com:27017/blah_meteor_com

mongodb://client-2ee8c14d:c1546ca8-4e7e-5883-0214-150b309fb4fb@SG-mother1-6242.servers.mongodirector.com:27017/blah_meteor_com

然后每次我重新输入

流星mongo --url blah.meteor.com

meteor mongo --url blah.meteor.com

假定我已经登录,并且刚刚得到与上面给出的URL类似的URL. 我通过输入以下内容来阅读"meteor mongo命令"文档:

I am assumed to have logged on already, and I just get presented with a similar url to the one I was presented with just above. I read the "meteor mongo command" documentation by entering:

流星mongo-帮助

meteor mongo --help

在文档中,我读了以下行:

In the documentation I read the following line:

指定--url(-U)会返回一个URL,而不是打开一个shell 适用于外部程序连接到数据库.对于远程 部署的应用程序上的数据库,URL有效期为一分钟.

Instead of opening a shell, specifying --url (-U) will return a URL suitable for an external program to connect to the database. For remote databases on deployed applications, the URL is valid for one minute.

出于含义,我回到了开头提到的线程(stackoverflow.com/questions/11801278/accessing-meteor-production-database)并阅读:

For the meaning, I went back to the thread (stackoverflow.com/questions/11801278/accessing-meteor-production-database) I mentioned in the beggining and read:

所以说的是,通过运行带有--url选项的命令所提供的url是用于通过某些外部应用程序(即流星以外的其他应用程序)连接到数据库."

"So what it's saying is, the url provided by running the command with the --url option is for connecting to the database by some external application, i.e. other than meteor."

除了2015年曾经做过的事情,我不知道还有什么其他应用程序可以帮助我连接到流星生产数据库:

I don't know what other application can help me connect to meteor production database other than what I used to do in 2015, which is:

流星mongo blah.meteor.com

meteor mongo blah.meteor.com

我在某处阅读了可以使用mongo shell intead的信息,但是我不知道如何打开它,并且在与流星一起安装mongo时,我也不知道其安装目录.我正在使用linux(fedora)操作系统.

I read somewhere that I can use the mongo shell intead but I don't know how to open it and I don't know the mongo installation directory when it is installed with meteor. I am using linux (fedora) OS.

我如何在2016年访问流星生产数据库?是否发生了升级,使我无法像2015年那样容易地访问流星生产数据库?

How do I access meteor production database in 2016? Are there upgrades that happened that make me not to be able to access meteor production database as easily as I did in 2015?

推荐答案

您正尝试连接到数据库版本3.0,而您的meteor mongo命令仍使用mongo版本2.6.7

You are trying to connect to a database version 3.0 while your meteor mongo command still use the version 2.6.7 of mongo

尝试此解决方法:

  • 直接在计算机上安装Mongo版本(3.x).
  • 然后运行此命令(安装sed后应在osx,linux和Windows上运行):

  • Install Mongo version (3.x) directly on your machine.
  • Then run this command (should work on osx, linux and windows when sed is installed):

mongo `meteor mongo --url XXX.meteor.com | sed 's/mongodb:\/\//-u /' | sed 's/:/ -p /' | sed 's/@/ /'`

来源: https://forums.meteor.com/t/meteor-mongo-xxx-meteor-com-giving-exception-login-failed-workaround/15289

这篇关于在2016年访问流星生产数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆