0

I have tried installing RMySQL for three versions of R, but I'm running into same warning message, that RMySQL is not available for that version. Please, help me out. Thanks.

install.packages("RMySQL",type="source") Warning in install.packages("RMySQL", type = "source") : 'lib = "C:/Program Files/R/R-2.15.3/library"' is not writable --- Please select a CRAN mirror for use in this session --- also installing the dependency ‘DBI’

trying URL 'http://ftp.iitm.ac.in/cran/src/contrib/DBI_0.2-7.tar.gz'
Content type 'application/x-gzip' length 194699 bytes (190 Kb)
opened URL
downloaded 190 Kb

trying URL 'http://ftp.iitm.ac.in/cran/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-gzip' length 165363 bytes (161 Kb)
opened URL
downloaded 161 Kb
<some text missing>

* DONE (DBI)
* installing *source* package 'RMySQL' ...
** package 'RMySQL' successfully unpacked and MD5 sums checked
checking for $MYSQL_HOME... C:\Program Files (x86)\MySQL\MySQL Server 5.6
ERROR: compilation failed for package 'RMySQL'
* removing 'C:/Users/Chanchal/Documents/R/win-library/2.15/RMySQL'

1: running command 'C:/PROGRA~1/R/R-215~1.3/bin/i386/R CMD INSTALL -l        "C:\Users\Chanchal\Documents/R/win-library/2.15"   C:\Users\Chanchal\AppData\Local\Temp\RtmpErKHEX/downloaded_packages/RMySQL_0.9-3.tar.gz' had status 1 
2: In install.packages("RMySQL", type = "source") :
installation of package ‘RMySQL’ had non-zero exit status


> install.packages("RMySQL")
Installing package(s) into ‘C:/Users/Chanchal/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)

package ‘RMySQL’ is available as a source package but not as a binary

Warning message:
package ‘RMySQL’ is not available (for R version 2.15.3)
  • 1
    Have you tried the installation instructions from the INSTALL manual? http://cran.r-project.org/web/packages/RMySQL/INSTALL – djhurio Jun 09 '14 at 13:12

1 Answers1

2

I have tried to install RMySQL for R version 3.1.0 on Windows platform. It did not work either. I ran into pretty much the same problem as yours. After reading the documentation for RMySQL package and googled around, I realized that installing RMySQL is very difficult on Windows since it does not have a binary file for Windows as stated in your output.

Instead of RMySQL, I installed RODBC package following instructions here: http://passionfordata.blogspot.com/2012/04/how-to-integrate-r-with-mysql-database.html

RODBC also allows you to connect R to MySQL database, with less trouble and much easier to set up. If your purpose is to connect to MySQL and open to using packages not limited to RMySQL, I would recommend RODBC.

Badoe
  • 1,580
  • 1
  • 12
  • 13