MySQL: The used command is not allowed with this MySQL version
For my own reference more than anything else, on my version of MySQL on Mac OS X, which is:
mysql5 Ver 14.14 Distrib 5.1.48, for apple-darwin10.4.0 (i386) using readline 6.1
When I try to use the 'LOAD DATA LOCAL' option to load data into tables I get the following error message:
ERROR 1148 (42000) at line 4: The used command is not allowed with this MySQL version
Which we can get around by using the following flag as described in the comments of the documentation:
mysql --local-infile -uroot -pandsoon
Or by putting the following entry in a config file (in my case ~/.my.cnf):
[mysql]
local-infile
I tried a bit of googling to see if I could work out why it happens but I’m still none the wiser.
About the author
I'm currently working on short form content at ClickHouse. I publish short 5 minute videos showing how to solve data problems on YouTube @LearnDataWithMark. I previously worked on graph analytics at Neo4j, where I also co-authored the O'Reilly Graph Algorithms Book with Amy Hodler.