first commit

This commit is contained in:
Chris Cromer 2022-09-02 17:06:02 -04:00
commit af71948632
5 changed files with 23 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.code-workspace
config.R

5
alai.R Normal file
View File

@ -0,0 +1,5 @@
source("config.R")
if (!exists("dbListTables", mode = "function")) source("mysql.R")
dbListTables(conn)

5
config.R.example Normal file
View File

@ -0,0 +1,5 @@
dbuser <- 'user'
dbpass <- 'pass'
dbname <- 'dbname'
dbhost <- 'localhost'
dbport <- 3306

1
install_libs.R Normal file
View File

@ -0,0 +1 @@
install.packages("RMySQL")

10
mysql.R Normal file
View File

@ -0,0 +1,10 @@
library(RMySQL)
conn = dbConnect(
MySQL(),
user = dbuser,
password = dbpass,
dbname = dbname,
host = dbhost,
port = dbport
)