Learn R Programming

dabr (version 0.0.4)

open_conn_mysql: Connect to database

Description

Uses RMariaDB to open a connection to a MySQL database.

Usage

open_conn_mysql(
  dbname,
  user = "root",
  password = NULL,
  host = "127.0.0.1",
  port = 3306
)

Value

MariaDBConnection connection object.

Arguments

dbname

Database/Schema name.

user

Username of database owner.

password

Password (default: NULL).

host

Database host, it can be local (default) or remote.

port

Database port.

See Also

Other DB functions: close_conn(), delete(), insert(), list_tables(), select_all(), select(), update()

Examples

Run this code
if (FALSE) {
conn <- open_conn_mysql("sys")
}

Run the code above in your browser using DataLab