Adventures in Smarshland

October 16, 2011

RMySQL Install on Windows XP 32-bit

Filed under: Uncategorized — smarsh @ 4:34 pm

I found the install for RMySQL, an R package that links to a MySQL database, somewhat cumbersome.  Here were a few things I had to tweak to get it right.

For starters, I was installing using R-2.13.2, RMySQL-0.8-0, and MySQL-5.5

First, you have to specify the path to MySQL:

For me this was: C:\\Program Files\\MySQL\\MySQL Server 5.5, but you must specify it a little bit differently, here is the R command to execute from within Rgui.exe


Next, the R install expects to find a few files (libmysql.dll and libmysql.lib) that in MySQL 5.5 reside in C:\\Program Files\\MySQL\\MySQL Server 5.5\\lib to actually reside in C:\\Program Files\\MySQL\\MySQL Server 5.5\\lib\\opt

To fix this make the subdirectory “opt” and copy the files into that subdirectory

You will also need to copy the file “libmysql.dll” from “C:\\Program Files\\MySQL\\MySQL Server 5.5\\lib” to your R\\bin directory which would be “C:\\Program Files\\R\\R-2.13.2\\bin\\i386” on 32-bit Windows or on 64-bit Windows “C:\\Program Files\\R\\R-2.13.2\\bin\\x64”, Hat-tip to the following StackOverflow answer.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress