useMySQL-EnsDb-method: Use a MySQL backend

Description Usage Arguments Details Value Note Author(s) Examples

Description

Change the SQL backend from SQLite to MySQL. When first called on an EnsDb object, the function tries to create and save all of the data into a MySQL database. All subsequent calls will connect to the already existing MySQL database.

Usage

1
2
## S4 method for signature 'EnsDb'
useMySQL(x, host = "localhost", port = 3306, user, pass)

Arguments

x

The EnsDb object.

host

Character vector specifying the host on which the MySQL server runs.

port

The port on which the MySQL server can be accessed.

user

The user name for the MySQL server.

pass

The password for the MySQL server.

Details

This functionality requires that the RMySQL package is installed and that the user has (write) access to a running MySQL server. If the corresponding database does already exist users without write access can use this functionality.

Value

A EnsDb object providing access to the data stored in the MySQL backend.

Note

At present the function does not evaluate whether the versions between the SQLite and MySQL database differ.

Author(s)

Johannes Rainer

Examples

1
2
3
4
5
6
7
8
9
## Load the EnsDb database (SQLite backend).
library(EnsDb.Hsapiens.v75)
edb <- EnsDb.Hsapiens.v75
## Now change the backend to MySQL; my_user and my_pass should
## be the user name and password to access the MySQL server.
## Not run: 
edb_mysql <- useMySQL(edb, host = "localhost", user = my_user, pass = my_pass)

## End(Not run)

Bioconductor-mirror/ensembldb documentation built on Aug. 5, 2017, 4:40 a.m.