How to write the data frame in R into MySQL?
dateTime host authId sessionId status action
Use the dbWriteTable function. It looks like this :
dbWriteTable(connection, value = data.frame, name = "MyTable", append = TRUE )
The function is well documented.
P.S Also look at: RMySQL dbWriteTable with field.types
See help(dbSendQuery) for generic update ... statements in SQL, and help(dbWriteTable) to write an entire data frame to a new table.
It worked for me using the command below. Note that this will append the rows in yourtable to the database named yourTableInMySQL.
library(RMySQL)
dbWriteTable(con, "yourTableinMySQL", yourtable, append = TRUE)