· mysql

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.

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket