Friday, June 28, 2013

RMySQL on Ubuntu 12.04

At our little start-up we run our system on MySQL and i constantly want to play around with data to have an overview of how users are registering, searching etc As you might have noticed from my previous blogs, i'm sticking to R for all my analyses so even MySQL will be accessed from R so reason why i need to install RMySQL


I kicked off my R tool by typing R at the prompt and running.


> install.packages(“RMySQL”)


This loads and throws me these errors


ERROR: configuration failed for package ‘RMySQL’ ...


I looked up online and there seems to be a dependency for just a linux package "libmysqlclient-dev" which contains MySQL so i went ahead an installed that too.


$sudo apt-get install libmysqlclient-dev


$sudo apt-get install r-cran-rmysql


then finally go back to the R shell
> install.packages(“RMySQL”)


and woohooo that runs smoothly on my Ubuntu 12.04 Linux Machine.

2 comments:

Add any comments if it helped :)