简体   繁体   English

使用rmongodb将R连接到远程mongoDB

[英]Connect R to remote mongoDB with rmongodb

I'm trying to connect remotely to mongoDB from R: The credentials code to connect looks like this. 我正在尝试从R远程连接到mongoDB:连接的凭据代码如下所示。

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

MongoDB is installed locally, and the misterious side of the question is that the connection works using the command line tool. MongoDB安装在本地,而问题的另一面是使用命令行工具进行连接。 The call looks like this: 呼叫看起来像这样:

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

I've also tried RMongo but didn't work either. 我也尝试过RMongo但也没有用。 Using OSX and R version 3.2.0. 使用OSX和R版本3.2.0。

rmongodb doesn't support SCRAM-SHA-1 authentication. rmongodb不支持SCRAM-SHA-1身份验证。 see https://github.com/mongosoup/rmongodb/issues/77 . 参见https://github.com/mongosoup/rmongodb/issues/77 Check mongolite package. 检查蒙古包

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM