Learn R Programming

etl (version 0.4.1)

src_mysql_cnf: Connect to local MySQL Server using ~/.my.cnf

Description

Connect to local MySQL Server using ~/.my.cnf

Usage

src_mysql_cnf(dbname = "test", groups = "rs-dbi", ...)

Arguments

dbname

name of the local database you wish to connect to. Default is test, as in mysqlHasDefault.

groups

section of ~/.my.cnf file. Default is rs-dbi as in mysqlHasDefault

...

arguments passed to src_mysql

See Also

src_mysql, mysqlHasDefault

Examples

Run this code
if (require(RMySQL) && mysqlHasDefault()) {
  # connect to test database using rs-dbi
  db <- src_mysql_cnf()
  class(db)
  db
  # connect to another server using the 'client' group
  src_mysql_cnf(groups = "client")
}

Run the code above in your browser using DataLab