6

I have tried to install MySQL package in R But unable to install package properly. Here is the code I have used

install.packages('RMySQL',type='source') 

I am getting error like

Installing package into ‘C:/Users/Techrains/Documents/R/win-library/3.1’ (as ‘lib’ is unspecified) 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 * installing *source* package 'RMySQL' ... ** package 'RMySQL' successfully unpacked and MD5 sums checked Warning: running command 'sh ./configure.win' had status 127 ERROR: configuration failed for package 'RMySQL' * removing 'C:/Users/Techrains/Documents/R/win-library/3.1/RMySQL' The downloaded source packages are in ‘C:\Users\Techrains\AppData\Local\Temp\Rtmp8ihccf\downloaded_packages’ Warning messages: 1: running command '"C:/PROGRA~1/R/R-31~1.1/bin/i386/R" CMD INSTALL -l "C:\Users\Techrains\Documents\R\win-library\3.1" C:\Users\TECHRA~1\AppData\Local\Temp\Rtmp8ihccf/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 

I am new to R. Can anyone help me out, would be appreciated. Thanks in advance.

3
  • First install MySQL itself (getting it from MySQL site is preferred) and copy any dll files found in the installation into the MySQL bin subdirectory. Then read the INSTALL file that comes with the RMySQL package. Commented Aug 1, 2014 at 12:05
  • I have installed MySQL 5.0. Can you please more elaborate @G.Grothendieck Commented Aug 1, 2014 at 12:37
  • 1
    Refer this ahschulz.de/2013/07/23/installing-rmysql-under-windows Commented Apr 23, 2015 at 12:42

1 Answer 1

1

This may seem like a silly question, but did you try simply:

install.packages("RMySQL") 

I just installed the package using the above line and it tried pulling the package from the CRAN library:

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/RMySQL_0.10.4.zip' 

Which is different from the URL your code tried. Additonally the package ws 1.8MB from the CRAN library where yours was only 161KB, which leads me to believe something is off with the file your code is downloading.

Perhaps first try removing the package you downloaded to by using:

remove.packages("RMySQL") 

Edit: And I just realized this was asked over a year ago, oops. I will leave my answer here anyway.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.