You may need to set up ODBC Drivers on your computer prior to using this function, see https://db.rstudio.com/best-practices/drivers/. If you cant connect to the database and get lost in endless and frustrating errors with no solution, download the package praise install.packages("praise") and run the following function praise::praise() until you feel better again -- and file an issue.

connect_mysql(
  driver = "MySQL ODBC 8.0 Unicode Driver",
  server = "109.74.194.173",
  UID = "opendata",
  PWD = "letmein",
  Port = 3306,
  database = "SUCE",
  open_data = FALSE
)

Arguments

driver

String, default is set to "MySQL ODBC 8.0 Unicode Driver", on Mac this may have to be changed to "MySQL ODBC 8.0 ANSI Driver", In case these options don't work, it may help to check the installed database drivers on your computer using odbc::odbcListDrivers().

server

String, specifying the server address. The default value is correct- an argument is provided in case we ever move the server

UID

String, specifying the 'user id'. Defaults to "opendata" which is a special user who can see the open data only. If you have your own account set it with Sys.setenv("UID_MYSQL_SUCE" = "user.name")

PWD

String, specifying SUPER secure personal password. Defaults to "letmein" which is the open data user password You can set this using Sys.setenv("PWD_MYSQL_SUCE" = "SECRET_PASSWORD")

Port

Numeric, default is set to 3306

database

String, default is set to "SUCE"

Value

Last updated by

Milan Wiedemann

Last updated date

2021-07-18