Error code: 1148. The command used is not allowed with this version of MySQL

R programming language

This is my request:

LOAD DATA LOCAL INFILE '/home/ap_506/KF/export_2015-07-20.csv' INTO TABLE test.raporty FIELDS TERMINATED BY ';' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES; 

I put local-infile=1 in the file: /etc/mysql/my.cnf :

 [mysql] local-infile=1 [mysqld] local-infile=1 

and it still returns an error:

 Error Code: 1148. The used command is not allowed with this MySQL version 

Version:

SELECT VERSION() returns: '5.5.40-0ubuntu0.12.04.1'

It works, and I can download it through the terminal using:

 mysql -h <server> -u <user> -p --local-infile <database> 

and I can download this from WINDOWS too

but it’s not a soul, because I need to use ubuntu and load data from R. Can you help me?

+6
source share
1 answer

I found a private solution. I added 2 lines to /etc/mysql/my.cnf :

 [odbc] local-infile=1 

and I can use the LOAD DATA LOCAL INFILE INFILE query via RODBC in R, but there is a problem with Workbench: Error Code: 1148. The used command is not allowed with this MySQL version. Any ideas? How can I check which drivers Workbench uses?

0
source

All Articles