I am running Ubuntu 12.04 and MySQL 5.5 Alright so here is the problem:
Using the MySQLDB module for Python, the SQL command:
cursor.execute(\"LOAD D
As I see, there is no file option local-infile. But you can change this value dynamically in a script.
To view this option run this query -
SELECT @@global.local_infile;
To set variable use this statement -
SET @@global.local_infile = 1;
Tested in MySQL command line console, everything is OK:
SET @@GLOBAL.local_infile = 1;
LOAD DATA LOCAL INFILE 'test.csv' INTO TABLE table1;
Query OK, 3 rows affected (0.06 sec)
SET @@GLOBAL.local_infile = 0;
LOAD DATA LOCAL INFILE 'test.csv' INTO TABLE table1;
ERROR 1148 (42000): The used command is not allowed with this MySQL version