mysqlHasDefault function

Check if default database is available.

Check if default database is available.

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()

Examples

if (mysqlHasDefault()) { db <- dbConnect(RMySQL::MySQL(), dbname = "test") dbListTables(db) dbDisconnect(db) }
  • Maintainer: Jeroen Ooms
  • License: GPL-2
  • Last published: 2025-02-08