To use the RJDBC package, follow these steps:
- Load the RJDBC library, and create a connection object. Make sure to point to the correct location of the downloaded .jar file:
> library(RJDBC) > driver <- JDBC("com.mysql.jdbc.Driver", classpath= "/etc/jdbc/mysql-connector-java-5.1.34-bin.jar", "'") > con <- dbConnect(driver, "jdbc:mysql://host:port/Customer" , "username","password")
- The remaining operations are identical to those in the Using RMySQL section.