首页 > 解决方案 > Rstudio中的MongoDB连接与odbc

问题描述

我正在尝试使用 R 中的 library(odbc) 连接到 mongoDB 数据库。首先我从这里安装了驱动程序,然后我使用了以下方法:

con <- dbConnect(odbc::odbc(),
  Driver        = "MongoDB ODBC 1.3.0 Unicode Driver",
  Server        = "xxxxx",
  AuthMechanism = "SCRAM-SHA-1", 


  Port          = 27017,
  Database      = "test",
  UID           = "utest",
  PWD           = "ptest"
)

但是会出现以下错误:

错误:nanodbc/nanodbc.cpp:983: 08S01: [MySQL][ODBC 1.3(w) Driver]在“等待初始通信数据包”时丢失与 MySQL 服务器的连接,系统错误:10060

我将不胜感激。谢谢

标签: rmongodbodbc

解决方案


推荐阅读