A quick note for who have the need of installing RMySQL on CentOS (or RHEL).
On my system R is installed via the EPEL repository (as I’ve added in the comments of this post of this very blog).
Given this I went to the RMySQL project page and downloaded both the RMySQL_0.7-5.tar.gz and the (required) DBI_0.2-5.tar.gz packages.
This because installing the R-DBI package provided by the activated repository on my system gave me errors during the actual RMySQL installation.
So, as root – since the installation was needed system-wide – i gave those two followind commands:
[root@testing ~]# R CMD INSTALL DBI_0.2-5.tar.gz
[root@testing ~]# R CMD INSTALL RMySQL_0.7-5.tar.gz
Then all the user needed to do was loading into his R enviroment the new modules!
Happy coding!
Today I’ve installed the 0.8-0 release on a freshly installed machine. Be sure to have installed the mysql-devel package before issuing the R CMD INSTALL RMySQL**** command…
Your tutorial was very helpful. Just one issue that should be pointed out that one should have installed mysql-devel (yum install mysql-devel) since RMySQL looks for the MySQL headers and on 64 bit centos declare the following variable
export PKG_CPPFALGS=”-I/usr/include/mysql”
export PKG_LIBS=”-L/usr/lib64/mysql -lmysqlclient”
.. and also install the make package (yum install make).