Wednesday 9 June 2010

RMySQL and mysql connector odbc 5.1.6

I think installing mysql-connector-odbc-5.1.6-win32.msi upset RMySQL.

In R, running
library("RMySQL")
gave me
... Error in if (utils::file_test("-d", MySQLhome)) break : ...

Setting MYSQL_HOME to C:\PROGRA~1\MySQL\MYSQLS~1.0
fixed the problem (using XP's System, Advanced, Environment Variables, System Variables).

References:
https://stat.ethz.ch/pipermail/r-sig-db/2009q2/000648.html
http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL

Edit:
Except that only lets me load the library, connecting doesn't work now. Gave it the mysqllib.dll that comes with HeidiSQL, that'll work until mysql-5.1.47-win32.msi finishes downloading (copied the dll into a dir called "bin", set MYSQL_HOME to dir that bin dir was in).