Reputation: 651
After having created a table called Notes successfully, I want to import data from a csv file into my database into Notes from a csv file notes.csv:
mysql> LOAD DATA LOCAL INFILE 'Books/notes.csv'
-> INTO TABLE Notes
-> FIELDS
-> TERMINATED BY '\t'
-> ENCLOSED BY ''
-> ESCAPED BY '\\'
-> LINES
-> STARTING BY ''
-> TERMINATED BY '\n'
-> ;
ERROR 1148 (42000): The used command is not allowed with this MySQL version.
mysql> SELECT VERSION();
+-------------------------+
| VERSION() |
+-------------------------+
| 5.6.30-0ubuntu0.15.10.1 |
+-------------------------+
1 row in set (0,00 sec)
apparently from https://dev.mysql.com/doc/refman/5.6/en/load-data.html LOAD TABLE is a legal clause in 5.6+.
What am I doing wrong?
Upvotes: 1
Views: 387
Reputation: 34285
This is the expected error message if local_infile server system varibale is set to 0 (false), disabling local file uploads to the mysql server.
Upvotes: 2