title: LOAD DATA LOCAL INFILE gives the error The used command is not allowed with this MySQL version
body: <p>I have a PHP script that calls MySQL's <code>LOAD DATA INFILE</code> to load data from CSV files. However, on production server, I ended up with the following error:</p>
  
  <blockquote>
    <p>Access denied for user ... (using password: yes)</p>
  </blockquote>
  
  <p>As a quick workaround, I changed the command to <code>LOAD DATA LOCAL INFILE</code> which worked. However, the same command failed on client's server with this message:</p>
  
  <blockquote>
    <p>The used command is not allowed with this MySQL version</p>
  </blockquote>
  
  <p>I assume this has something to do with the server variable: <a href="http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_local_infile"><code>local_infile = off</code></a> as described <a href="http://dev.mysql.com/doc/refman/5.1/en/load-data-local.html">here</a>.</p>
  
  <p>Please suggest a workaround that does not involve changing server settings. Note that phpMyAdmin utility installed on the same server appears to accept CSV files though I am not sure it it uses <code>LOAD DATA (LOCAL) INFILE</code>.</p>