1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/default.R
\name{mysqlHasDefault}
\alias{mysqlHasDefault}
\title{Check if default database is available.}
\usage{
mysqlHasDefault()
}
\description{
RMySQL examples and tests connect to a database defined by the
\code{rs-dbi} group in \code{~/.my.cnf}. This function checks if that
database is available, and if not, displays an informative message.
}
\examples{
if (mysqlHasDefault()) {
db <- dbConnect(RMySQL::MySQL(), dbname = "test")
dbListTables(db)
dbDisconnect(db)
}
}
|