db_info: Get the connection info for a specific database

Description Usage Arguments Value Examples

View source: R/db.R

Description

To be used with db_connect (see the example). For the database on Scrol server, one can go though SSH (e.g. when using EduRoam or at NTU). However at present this connection does not work. It is first necessary to set up a tunnel through Putty (see https://blog.devolutions.net/2017/4/how-to-configure-an-ssh-tunnel-on-putty). Same thing for SSL (Google database). The connection info are now stored in a file (my.cnf). See https://github.com/r-dbi/RMySQL/issues/131

Usage

1
2
3
4
db_info(
  database_name,
  file_cnf = "C:/daniel.vaulot@gmail.com/Databases/MySQL/my.cnf"
)

Arguments

database_name

One of the following choices "rcc", "pr2_google", "metapr2_google", "rcc_local", "pr2_local", "metapr2_local"

file_cnf

by default "C:/daniel.vaulot@gmail.com/Databases/MySQL/my.cnf" but can be moved to another location (e.g. when using dvutils on a server)

Value

A list with the database connection info "user","password","dbname","host"

Examples

1

vaulot/dvutils documentation built on Nov. 20, 2021, 11:01 a.m.