[R] Re: RMySQL

Laurent Faisnel laurent.faisnel at ariase.com
Thu Apr 24 11:51:27 CEST 2003


Wladimir Eremeev wrote:

>Dear laurent,
>
>  
>
>>This is what I did to make the connection :
>> > drv <- dbDriver("MySQL")
>> > con <- dbConnect(drv)
>>    
>>
>
>Here's the error.
>You should give the database name.
>
It is indicated in the config file my.cnf , no problem. In fact the 
database I tried to work on had a little problem yesterday, all tables 
disappeared a few hours long. Hence it was difficult to get any result. 
Thank you anyway.
Parameters such as dbname, user, passwd, host, port can be given either 
in the config file my.cnf or at the time you define the connection in R 
(the solution you advised me).

>drv <-dbConnect(drv, dbname="dfghdfgsdfgsdfgsdfgsdfgsdfgsdf")
>                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  
>
>>Then I should be able to send requests. But when I try this :
>> > dbListTables(con)
>>character(0)
>>    
>>
>
>Of course.
>Tables are stored in the database. You didn't provide its name.
>Function dbListTables doesn't know which tables should it list.
>  
>  
>



More information about the R-help mailing list