I want to upload a dataframe 'mtcars' to mysql database.
This is what Ive done so far:
library(RMySQL)
library(tidyverse)
library(dbplyr)
library(odbc)
library(DBI)
ydb <- DBI::dbConnect(MySQL(),
user='user',
password='password',
dbname='sakila',
host="127.0.0.1")
payment2 <- dplyr::tbl(mydb,"payment") %>% collect() # it is just a connection
copy_to(dest = mydb,df = payment2, temporary = FALSE)
The dataset is uploaded but it is empty, and I have this errors message:
*Error in .local(conn, statement, ...) :
could not run statement: Loading local data is disabled; this must be enabled on both the client and server sides*