Sunday, January 8, 2012

Advanced R - mysql

Install MySQL

http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL

2 down vote accepted

Found solution with help of ran2, who gave me link to common question. The basic process is described here, but there are several hints, So I will describe the whole solution (please change the R version and paths if needed):

  1. Install latest RTools from here
  2. install MySQL or header and library files of mysql
  3. create or edit file C:\Program Files\R\R-2.12.1\etc\Renviron.site and add line like MYSQL_HOME=C:/mysql (c:\PROGRA~1\MySQL\MYSQLS~1.5 for version 5.5)
  1. copy libmysql.lib from mysql/lib to mysql/lib/opt to meet dependencies.
  1. copy libmysql.dll to C:\Program Files\MySQL\MySQL Server 5.5\bin
  1. run install.packages('RMySQL',type='source') and wait while compilation will end.

Thanks to all who tried to answer.

No comments: