AW: [R] Can you create a MySQL database with RMySQL?

Christian Schulz christian.schulz at questico.de
Thu Oct 23 12:31:01 CEST 2003


>>library(DBI)
>>library(RMySQL)
>>drv <- dbDriver("MySQL")
>>con <- dbConnect(drv,"test","root","")
>>dbListTables(con)
[1] "dmjanuar"  "dmjuli"    "dmmai"     "model0"    "ndata"     "newtable"
[7] "uebergang" "weka"
>>mysqlQuickSQL(con, "Create table newTable( attr1 int, attr2 int)")
>>dbListTables(con)
[1] "dmjanuar"  "dmjuli"    "dmmai"     "model0"    "ndata"     "newtable"
[7] "uebergang" "weka"
>>
>>dbListFields(con,"newTable")
[1] "attr1" "attr2"
>>

regards,christian


-----Ursprüngliche Nachricht-----
Von: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]Im Auftrag von Barnet Wagman
Gesendet: Donnerstag, 23. Oktober 2003 08:38
An: R-help at stat.math.ethz.ch
Betreff: [R] Can you create a MySQL database with RMySQL?


Is it possible to create a database in MySQL via RMySQL?

Also, is the format for the authorization field
'userName/password at databasename'?  I saw an example like this somewhere
in the documenation, but I haven't found the actual specification.

Thanks,

Barnet Wagman

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list