
Last chance! 50% off unlimited learning
Sale ends in
RMySQL examples and tests connect to a database defined by the
rs-dbi
group in ~/.my.cnf
. This function checks if that
database is available, and if not, displays an informative message.
mysqlHasDefault()
# NOT RUN {
if (mysqlHasDefault()) {
db <- dbConnect(RMySQL::MySQL(), dbname = "test")
dbListTables(db)
dbDisconnect(db)
}
# }
Run the code above in your browser using DataLab