我不时需要制作有关查询数据库时出现的错误的可重现的示例;有时这些错误无法使用内置数据集重现。
是否有可用于制作可重复示例的公开数据库列表? 我知道他的一个
src_mysql(dbname = "dplyr",
host = "dplyr.csrrinzqubik.us-east-1.rds.amazonaws.com",
port = 3306,
user = "dplyr",
password = "dplyr")
但它给了我一个错误
Error in .local(drv, ...) :
Failed to connect to database: Error: Unknown MySQL Server Host 'dplyr.csrrinzqubik.us-east-1.rds.amazonaws.com' (8)
中找不到任何关于这种特定情况的提法
答案 0 :(得分:1)
来自http://shiny.rstudio.com/articles/
library(dplyr)
my_db <- src_mysql(
dbname = "shinydemo",
host = "shiny-demo.csa7qlmguqrf.us-east-1.rds.amazonaws.com",
user = "guest",
password = "guest"
)
# get the first 5 rows:
my_db %>% tbl("City") %>% head(5)