MySQL CSV import permission denied
<p>Similar problems have been discussed many times, but I found no solution working in my case.</p>

<p>Mysql version :</p>

<pre><code>$ mysql --version
mysql  Ver 14.14 Distrib 5.6.30, for debian-linux-gnu (x86_64) using  EditLine wrapper
</code></pre>

<p>On Ubuntu 15.10 64 bits desktop.</p>

<p>Here is the command i try to run :</p>

<pre><code>$ mysql -u dmeziere -p -e "LOAD DATA INFILE '/tmp/FR.csv' INTO TABLE project_dev.cities CHARACTER SET 'UTF8' FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n' IGNORE 0 ROWS (country_code, country_name, postal_code, place_name, admin_name1, admin_code1, admin_name2, admin_code2, admin_name3, admin_code3, latitude, longitude, accuracy);"
Enter password: 
ERROR 29 (HY000) at line 1: File '/tmp/FR.csv' not found (Errcode: 13 - Permission denied)
</code></pre>

<p>As you see, client and server are on the same host.</p>

<p>This command is a copy/paste of the one I usualy run on the same schema, on another server (MySQL 5.5.43 on Debian 8.0).</p>

<p>Trying "LOAD DATA LOCAL INFILE" is refused. adding --local-infile doesn't work.</p>

<p>Here are my grants :</p>

<pre><code>mysql&gt; show grants;
+--------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for dmeziere@localhost                                                                                                              |
+--------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'dmeziere'@'localhost' IDENTIFIED BY PASSWORD '***' WITH GRANT OPTION |
+--------------------------------------------------------------------------------------------------------------------------------------------+
1 rows in set (0,00 sec)
</code></pre>

<p>So I should have the FILE privilege. Anyway, i also tryed with the mysql root default account.</p>

<p>Here are the file perms :</p>

<pre><code>$ ll /tmp/FR.csv 
-rwxrwxrwx 1 dmeziere dmeziere 6,2M mai   25 13:08 /tmp/FR.csv
</code></pre>

<p>So the file exists and is accessible. As you imagine, I tried to move the file from a deeper path to limit errors, and gave it full permissions while trying to find clues. Perms on /tmp are drwxrwxrwt root root. I also tryed to sudo mysql.</p>

<p>Neither systems use SE Linux.</p>

<p>At last, I SELECTed * on the table to ensure it was still empty, to eliminate a false negative bug.</p>

<p>An idea ?</p>