[R] Installing RMySQL on Windows XP for R 1.9.1

Robert Wania Robert.Wania at mailbox.tu-dresden.de
Mon Aug 9 13:17:53 CEST 2004

I apologize for mixing the source and binary packages. (Although R didn't complain? Nevertheless this is no excuse)

After installing the binary package the only problem was the libmysql.dll, which was not found by R (but it was within the package).
I put it in the windows/system32 directory and everything works find.

Thanks for the instant help

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Prof Brian Ripley
Sent: Monday, August 09, 2004 12:22 PM
To: Henrik Bengtsson
Cc: r-help at stat.math.ethz.ch; 'Robert Wania'
Subject: RE: [R] Installing RMySQL on Windows XP for R 1.9.1

You do need a binary version of  RMySQL.

See http://cran.r-project.org/bin/windows/contrib/1.9/@ReadMe
which tells you to get it from


the very page you got the sources from.  I do think you should read all of
the pages you look at, as in both cases you have ignored crucial

On Mon, 9 Aug 2004, Henrik Bengtsson wrote:

> Hi, I cannot help you install RMySQL on Windows, but most likely RMySQL
> contains non-R code too, such as C code, that requires compilation and then
> your gunzip-untar-rezip approach will not work.

It never works, and no one said it did.  The rw-FAQ answers this question,
and the message in the archives said

	Please consult the rw-FAQ for how to install packages.

> For your information, you can use the RODBC package instead. I recently
> downloaded and installed a MySQL server on my Windows XP *Pro* machine. Then
> I use the RODBC package (on CRAN and installs directly on Windows) to
> connect to it. In order for this to work you have to have an ODBC service
> running on your machine. You will find one for most Windows versions called
> MyODBC on the mysql.com download pages (links at the right margin). When it
> works you will be connected to you db from R by
> library(RODBC)
> channel <- odbcConnect("MyDatabase", uid="root")   # or some other username
> df <- sqlQuery("select * from myTable")
> See also ?RODBC. I just did the above two days ago from scratch and it was
> pretty easy. I won't time to help you more now since I'm writing up my
> thesis...
> Cheers
> Henrik Bengtsson
> > -----Original Message-----
> > From: r-help-bounces at stat.math.ethz.ch
> > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Robert Wania
> > Sent: Monday, August 09, 2004 11:34 AM
> > To: r-help at stat.math.ethz.ch
> > Subject: [R] Installing RMySQL on Windows XP for R 1.9.1
> >
> >
> > Hi,
> >
> > I'm thankful for any help on installing RMySQL on Windows XP
> > for R 1.9.1
> >
> > The thread http://tolstoy.newcastle.edu.au/R/help/04/01/1021.html
> > already tried to discuss the matter. It concludes that
> > Windows Sources for Packages are alike the Linux ones.
> >
> > So I extracted the files from the RMySQL_*.tar.gz from
> > http://stat.bell-labs.com/RS-DBI/download/index.html
> > and stuffed them into a zip-file which was willingly taken by
> > the install routine of my RGui. It said the well known
> > "updating HTML package descriptions" but when using
> > library(RMySQL) the error "Error in testRversion(descfields)
> > : This package has not been installed properly. See the Note
> > in ?library". Obviously the note wasn't very helpful and so I
> > ask you for any help.

It was *very* helpful.  Your failure to read the rw-FAQ was unhelpful.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list