# # Create connection to MySQL #### # print("Establishing connection to MySQL server...") t <- Sys.time() MySQL_con <- dbConnect.structdata(); MySQL_con <- dbConnect.setExpliciteUtf8Mode(MySQL_con); print(sprintf("...done (%.2f sec)", as.numeric(difftime(Sys.time(),t,units = "secs"))))
getData.analysis <- function( con, data, data_ids = NULL, load_data_elements = FALSE, query = NULL, updateProgress = NULL) {
print(" Creating futures for keywords...") print(con) t <- Sys.time() data$keywords <- future({ con <- dbConnect.structdata(); con <- dbConnect.setExpliciteUtf8Mode(con); x <- encoding.data.frame(db.explore.keywords(con, query_db, count = 100)) dbDisconnect(con); x }) print(sprintf(" ...done (%.2f sec)", as.numeric(difftime(Sys.time(),t,units = "secs"))))
}
Warning:Error in: corrupt mysql handle