connection in R MySQL Connectivity In R Programmin # Create a connection Object to MySQL database. # We will connect to the sampel database named &q…