The RMySQL package uses the MYSQL_HOME environment variable to get to the needed libraries:
> dbWriteTable(con, "orders", order)
The dbWriteTable function inserts records into the table. If the table does not exist, it creates the table. By default, row.names of the data frame is added as a column to the table; if it is not needed, remember to set it to FALSE:
The dbReadTable function reads the table and creates a data frame:
> dbGetQuery(con,"select * from accomodation limit 5")
The dbGetQuery function executes the query and returns all the results as a data frame. When the table is large, it is better to use the dbSendQuery and fetch results as needed:
> rs <- dbSendQuery(con, "select * ...