title: Minimum database privileges to use load data infile
body: <p>I'm using mysqlimport to replace data in a table with values from a TSV file. Everything is working fine (importing data using the DB superuser name and password), so now I want to lock it down so that the database user doing the import can only affect the single table I want to replace.</p>
  
  <p>I know I need to grant FILE on <em>.</em> in order to use "LOAD DATA INFILE" (which mysqlimport wraps), but I'm having trouble finding the minimum set of permissions I can grant on the database.</p>
  
  <p>I've tried;</p>
  
  <pre><code>grant FILE on *.* to ...
  grant ALL on dbname.tablename to ....
  </code></pre>
  
  <p>But that gives me an error when I run mysqlimport;</p>
  
  <pre><code>mysqlimport: Error: Access denied for user ...
  </code></pre>
  
  <p>Does anyone know if it's possible to isolate the database so that only the relevant table can be altered by this user, or do I have to allow them broader access to make the mysqlimport possible?</p>