[R] RMySQL install on windows

Robert Baer rbaer at atsu.edu
Sat Oct 13 01:43:50 CEST 2012


On 10/10/2012 12:58 PM, Greg Snow wrote:
> I finally was able to compile/load it under windows 7.  I had similar
> problems to what you show below.
>
> I set the MYSQL_HOME environmental variable through windows (start
> button > control panel > System and Security > system > Advanced
> System Settings > Environmental variables).  I had to set it to the
> version of the path without spaces, in my case it was:
> c:\PROGRA~1\MySQL\MYSQLS~1.5
>
> Then I opened a command prompt window, changed to the directory where
> I  had downloaded the tar.gz file from cran and entered the command:
> "c:\Program Files\R\R-2.15.1\bin\x64\R" CMD INSTALL RMySQL_0.9-3.tar.gz
>
> and everything worked (it did not work if I used i386 or just the
> regular bin folder, possibly due to the version of MySQL I
> downloaded).
>
> Then I started a new instance of R and did library(MySQL) and
> everything loaded and I was able to connect to a local MySQL database.
>
> Hope this helps you as well.
>

Thanks, Greg.   I got a couple of warnings during the build, but I can 
at least load the library.  Now, I'll to to learn to use it<G>

I had downloaded the 64-bit MySQL engine.  The seemingly successful 
install was on R (64-bit).

I guess not unexpectedly I get the from R (i386)
 > library(RMySQL)
Error: package ‘RMySQL’ is not installed for 'arch=i386'

Appreciate the guidance.

Rob




More information about the R-help mailing list