I have installed an instance of a learning management system (Moodle) on AWS. The LMS uses MySQL. I want to gather data from the tables using R and use the following code:
library(DBI)
con <- dbConnect(RMySQL::MySQL(),
username="public1",
password="test",
host="127.0.0.1",
port=3306,
dbname="bitnami_moodle"
)
dbReadTable(conn = con, name = "mdl_user")
dbDisconnect(con)
This works properly as long as I am using a tunnel via PuTTY. However later on I want to use Shiny on a separate instance and there I will need to make a direct connection.
I looked through some discussions, but they are not detailed enough for my level of understanding. Can anyone explain to me how to do it?