If you want work with MySQL Database in R, you have to install RMySQL package.
There is very simple guide how you can install it.
- Open terminal and install dependencies first
sudo apt-get install libdbd-mysql libmysqlclient-dev
- Run R or RStudio and install RMySQL package
Done, you can connect your R project with MySQL DB now.