【发布时间】:2019-06-03 14:43:10
【问题描述】:
我最近在我的计算机上安装了 MySQL,并试图将 RStudio 连接到 MySQL。我按照书中的说明以及here 的说明进行操作。但是,每当我在 RStudio 中使用 dbConnect() 或 src_mysql 时,都会收到以下错误消息:
Error in .local(drv, ...) :
Failed to connect to database: Error: Plugin caching_sha2_password could not be loaded: The specified module could not be found
例如,我可能会在 Windows 中使用命令提示符登录 MySQL
mysql -u username -p
并按如下方式创建数据库
CREATE DATABASE myDatabase;
然后在 RStudio 中:
library(RMySQL)
db <- dbConnect(MySQL(), dbname = "myDatabase", user = "username",
password = "password", host = "localhost")
我的回答总是上面列出的错误消息。
如果你需要它:
sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
【问题讨论】: