使用 rmongodb 将 R 连接到远程 mongoDB [英] Connect R to remote mongoDB with rmongodb

查看:58
本文介绍了使用 rmongodb 将 R 连接到远程 mongoDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从 R 远程连接到 mongoDB:用于连接的凭据代码如下所示.

I'm trying to connect remotely to mongoDB from R: The credentials code to connect looks like this.

library(rmongodb)
mongo <- mongo.create(host="111.222.333.444", name='', username="username",
                      password="password", db="dbname",
                      timeout = 10L)

MongoDB 安装在本地,问题的神秘一面是使用命令行工具进行连接.调用如下所示:

MongoDB is installed locally, and the misterious side of the question is that the connection works using the command line tool. The call looks like this:

mongo host:port/dbname -u username -p password
MongoDB shell version: 3.2.1
connecting to: ...

我也试过 RMongo 但也没有用.使用 OSX 和 R 版本 3.2.0.

I've also tried RMongo but didn't work either. Using OSX and R version 3.2.0.

推荐答案

rmongodb 不支持 SCRAM-SHA-1 身份验证.请参阅 https://github.com/mongosoup/rmongodb/issues/77.检查 mongolite 包.

rmongodb doesn't support SCRAM-SHA-1 authentication. see https://github.com/mongosoup/rmongodb/issues/77. Check mongolite package.

这篇关于使用 rmongodb 将 R 连接到远程 mongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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