The following articles have information on how to configure R to connect to MySQL databases. They also have information on how to query MySQL databases from R. IBM Cloud Pak for Data A Simple Guide on Connecting RStudio to a MySQL Database