Here is how you set up a connection with a database.
Note: database, credentials, and database can chnage.
install.packages("odbc") # also install DBI
db = dbConnect(odbc(),
Driver = "MySQL ODBC 5.3 ANSI Driver",
Server = "127.0.0.1",
database = "classicmodels",
uid = "ebebeb",
pwd = "hbjkbwfqjhwbjh")
ofc <- dbGetQuery(db,'select * from table')