Setup MySQL connection using R in GNU linux


Aim

To connect mysql database using R is very important if you want to do some data analysis, I have extreamly bad experience on setting up it in GNU/linux, as I know, it is not easy to setup in windows as well.

Install

Install libmysqlclient-dev

sudo apt-get install libmysqlclient-dev

download and install RMySQL

wget http://cran.r-project.org/src/contrib/RMySQL_0.9-3.tar.gz
R CMD INSTALL --configure-args='--with-mysql-dir=/usr/lib' RMySQL_0.9-3.tar.gz 
苏命
苏命
副研究员

我的研究方向:水源地水质安全保障,主要针对水源地由于藻类爆发引起的水体嗅味问题开展研究。