How to make a reproducible example of connecting to a database?

From time to time I need to make reproducible examples of errors that I get when querying the database; sometimes these errors cannot be reproduced using the built-in datasets.

Is there a list of publicly available databases that we can use to create reproducible examples? I knew about him

src_mysql(dbname = "dplyr", host = "dplyr.csrrinzqubik.us-east-1.rds.amazonaws.com", port = 3306, user = "dplyr", password = "dplyr") 

But it gives me an error

 Error in .local(drv, ...) : Failed to connect to database: Error: Unknown MySQL Server Host 'dplyr.csrrinzqubik.us-east-1.rds.amazonaws.com' (8) 

I did not find a reference to this particular circumstance in the notorious question. How to make an excellent reproducible example of R?

+6
source share
1 answer

From 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) 
0
source

All Articles