[R] RMySQL...Can't initialize driver??? Solved!!!
Stephane Cruveiller
scruveil at genoscope.cns.fr
Wed Jun 28 09:42:53 CEST 2006
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.
>>
>
>
>
More information about the R-help
mailing list