Mongolab和Mongoose没有连接

时间:2015-10-01 23:04:05

标签: node.js bash mongodb mongoose mlab

@IBAction func btnNext1_click(sender: AnyObject) {
    self.first = false;
    let c = (self.storyboard!.instantiateViewControllerWithIdentifier("Welcome2") );
    self.presentViewController(c, animated: true, completion: nil);
    if (UIApplication.instancesRespondToSelector("registerUserNotificationSettings:")) {
        if #available(iOS 8.0, *) {
            let ns = UIUserNotificationSettings(forTypes: [UIUserNotificationType.Sound, UIUserNotificationType.Alert, UIUserNotificationType.Badge], categories: nil)
        } else {
            // Fallback on earlier versions
        };
        UIApplication.sharedApplication().registerUserNotificationSettings(ns);
    }
}

他们已经发送了一段时间的电子邮件。说“

您必须确保运行2.6的免费Sandbox数据库满足3.0的升级要求,其中包括MongoDB 3.0兼容驱动程序列表。如果在升级之前未将应用程序升级到3.0兼容的驱动程序,则可能无法连接到部署

我们正在运行最新版本的mongoose,但仍然出现错误

So on Sep 30 2015 MongoLab has updated their MongoDB to version 3.0.6. 

或尝试连接时出现此错误

MongoError: auth failed

我已经更新到mongodb的最新NPM,mongoose,我不明白哪些驱动程序需要更新

仅供我使用

{ [MongoError: auth failed] name: 'MongoError', ok: 0, errmsg: 'auth failed', code: 18 }

仍然没有运气

我还做了一个新的mongodb brew安装,它的工作方式是bash连接到mongolab

当我在bash中运行mongoose时

sudo npm install mongoose
sudo npm install mongo

我收到此回复:

 var mongoose = require('mongoose');
mongoose.connect("mongodb://XXX:XXX@XXX.mongolab.com:XXX/XXX");  //X'ed out user name and password and db

非常感谢任何帮助

0 个答案:

没有答案