Re: [R] RMySQL...Can't initialize driver??? Solved!!!

From: Stephane Cruveiller <scruveil_at_genoscope.cns.fr>
Date: Wed 28 Jun 2006 - 17:42:53 EST

Hi,

I have finally made it working. I do not if that was the problem but the libraries (DBI and RMySQL) were installed in a non-standard location (of course specified in a .Renviron file). Reinstalling both of them at R root did the trick...

thanks to you all for your help...

Stephane.

Rainer M Krug wrote:

> Stephane Cruveiller wrote:
>   

>> Rainer M Krug wrote:
>> I followed your instruction. Here is my .my.cnf:
>> ---------------------------------------------------------------------------
>> [client]
>> user=steff
>> password=XXXXXX
>> database=justforfun
>> ---------------------------------------------------------------------------
>> with it, I can connect to my MYSQL server without problem
>> and then I try to connect through R:
>>
>> ---------------------------------------------------------------------------
>>
>>> library(RMySQL)
>>>
>> Loading required package: DBI
>>
>>> m <- dbDriver("MySQL")
>>>
>> Error in new("MySQLDriver", Id = drvId) : unused argument(s) (Id ...)
>> ---------------------------------------------------------------------------
>>
>> It still produces the error. I really do not know what is going on
>> here...
>>
>
> Sorry - no idea. I guess you are using Linux? And all packages are up to
> date?
>
> Rainer
>
>
>
>
>   

>>
>>> Then you do:
>>>
>>>
>>> library("RMySQL")
>>> m <- dbDriver("MySQL")
>>> con <- dbConnect(m, group = "renpatch")
>>> q <- TheSQLQuery
>>> rs <- dbSendQuery(con, q)
>>> TheResults <- fetch(rs, n = -1)
>>> dbDisconnect(con)
>>> rm(con)
>>>
>>>
>>> and it should work - at least that is what it is doing for me.
>>>
>>> Rainer
>>>
>>>
>>>
>> Stephane.
>>
> > >

______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Received on Wed Jun 28 17:47:01 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 28 Jun 2006 - 18:12:37 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.