O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using RJDBC

To use the RJDBC package, follow these steps:

  1. 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") 
  1. The remaining operations are identical to those in the Using RMySQL section.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required