Skip to content

I can't do it again on an other PC : R+RMySQL ->error loading dll

10 messages · Peter Dalgaard, Gustaf Rydevik, Ptit_Bleu +1 more

#
Hello,

Some weeks ago, thanks to you, I managed to install R, to connect to a local
MySQL Database and to launch some queries with a script written with Tinn-R. 
My script is now ok and would like to test it with the "real" database.
I did the same installation of R, DBI package and RMySQL package I did on my
PC (I wrote everything I did in order to make it easy ...) but when I type
"libray(RMySQL), I got an error message (see below).

I tried to copy libmySQL.dll and RMySQL.dll in \system\ (like on my PC), in
\system32\, in \R\bin\ and to change the path. But always the same error
message ...

Has anybody any other solution I can try ?
Thanks in advance,
Ptit Bleu.   


-------------------------------------------------------------
R version 2.5.1 (2007-06-27)
Copyright (C) 2007 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R est un logiciel libre livr? sans AUCUNE GARANTIE.
Vous pouvez le redistribuer sous certaines conditions.
Tapez 'license()' ou 'licence()' pour plus de d?tails.

R est un projet collaboratif avec de nombreux contributeurs.
Tapez 'contributors()' pour plus d'information et
'citation()' pour la fa?on de le citer dans les publications.

Tapez 'demo()' pour des d?monstrations, 'help()' pour l'aide
en ligne ou 'help.start()' pour obtenir l'aide au format HTML.
Tapez 'q()' pour quitter R.
[1] "C:/R/library"
Error in dyn.load(x, as.logical(local), as.logical(now)) : 
        impossible de charger la biblioth?que partag?e
'C:/R/library/RMySQL/libs/RMySQL.dll':
  LoadLibrary failure:  L'acc?s ? cet emplacement de la m?moire n'est pas
valide.


Erreur : le chargement du package / espace de noms a ?chou? pour 'RMySQL'
------------------------------------
#
Hi,

just to say that I "solved" my problem. I wrote "solved" because all I did
was to uninstall R and the DBI and RMySQL libraries and then install
everything again.
The only change is that I used another RMySQL.zip file found at this address
:
http://www.bioconductor.org/packages/2.0/extra/bin/windows/contrib/2.5/RMySQL_0.6-0.zip
(the file is much bigger than the one I used on my PC : 1064 Mo instead of
383 Mo).

I installed the DBI and the RMySQL packages from R (intallation from .zip
file).
I typed "library(RMySQL)" and it directly worked, without copying the .dll
in some other places.

Maybe it can help some people. 

Have a nice day,
Ptit Bleu.
#
Ptit_Bleu wrote:
Umm, that looks more than a bit unofficial (parent directory read
protected, no hint of an RMySQL package elsewhere on the site).  Are you
sure that this is intended for redistribution? It sounds like it bundles
in some MySQL libraries, which could imply legal issues.

  
    
#
Hi Peter,

I really have no idea about your comment. I was so happy to be able to
connect to my database ... 

In fact I found the address in the following post :
https://stat.ethz.ch/pipermail/r-help/2007-August/138142.html

Do you think I can't use it freely ? :(

Thanks for your comments,
Ptit Bleu.

Umm, that looks more than a bit unofficial (parent directory read
protected, no hint of an RMySQL package elsewhere on the site).  Are you
sure that this is intended for redistribution? It sounds like it bundles
in some MySQL libraries, which could imply legal issues.

-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
#
Do you need precisely RMySQL and DBI? 
RODBC can successfully replace this.

I used RMySQL some time ago, but then, after the next version upgrade it
stopped working.

Switching to RODBC was almost without pain, since function names were quite
similar.
I simply replaced dbGetQuery with sqlGetQuery in my script and voilia.

However, you need to install the MySQL ODBC driver and set up a data source
in the Windows Control Panel before.
Ptit_Bleu wrote:

  
    
#
Ptit_Bleu wrote:
I don't think anyone is going to send the police.

We do need to be a bit careful about these matters, though. E.g. I
communicate with my publisher using HTTP sometimes. That doesn't mean
that it is allowed to download the book manuscript for free if you can
guess the URL....

  
    
#
On 9/11/07, Peter Dalgaard <P.Dalgaard at biostat.ku.dk> wrote:
Actually, there was a case in Sweden a couple of years back, where a
reporter managed to access an anual report for a company, a couple of
days before the report became public.
He managed this by guessing url:s.

The reporter got sued, and the court ruled that accessing material,
private or not, by typing in url's is not illegal. Meaning that I
would be allowed to download your book manuscript if I happened to
stumble on the web adress. If the adress was not protected of course.

/Gustaf
1 day later
#
Hi Vladimir,

In fact, at the beginning, I tried to install RODBC and the MySQL driver but
I did not manage (I think due to the driver and the configuration in the
control panel). Then I tried to install RMySQL and DBI on my PC (not the one
with the "real" database), and it worked without any problem. So I keep
working with RMySQL.

You think there are advantages to try again installing RODBC ?

Anyway, for the moment, I think I will continue with RMySQL, just because it
works. But for me it is a good reason (especially because I'm not a
specialist of PCs and I don't have the time to become one. I'm only an
end-user).

Have a nice day,
Ptit Bleu.
Vladimir Eremeev wrote:

  
    
#
Hi!
In my case, advantages of using RODBC are in the fact that it is working,
and is getting updated on a regular basis. Nothing more. :)

I also had some difficulties to set up the DSN, old Windows NT 4.0 required
couple of restarts, and guessing correct 'magic' line to make MS Excel to
retrieve the data was difficult. The procedure is simplified in Win2000/XP.

I have MySQL ODBC 3.51 Driver installed.
Then I go to Start -> Control Panel -> Administrative Tools, double-click on
'Data sources (ODBC)', click
'Add' in the opened window, choose 'MySQL ODBC 3.51 Driver' from the list,
enter host name, database name, user name and password. Port is 3306 by
default.
Then pressing 'Test Data source' shows if everything is set up correctly.
MySQL also have to be configured to allow connections.

RODBC also contains the file with the comprehensive instructions
(R_HOME/Library/RODBC/Readme).
Ptit_Bleu wrote:

  
    
#
Thanks for the procedure. It sounds easy.
I will test it when I have time and see if there are differences (I hope I
won't see anything : from a working configuration, if I change to RODBC, I'd
like to get another working one).

Ptit BLeu.
Vladimir Eremeev wrote: