While trying to import a CSV file into MySQL today using the LOAD DATA INFILE command, I ran into the following situation:
mysql> LOAD DATA INFILE 'foo.csv' INTO TABLE bar FIELDS TERMINATED BY ',' ENCLOSED BY '#' LINES TERMINATED BY '\r' (a, b);
ERROR 29 (HY000): File 'foo.csv' not found (Errcode: 13)
The file exists fine and the permissions are also kosher. After much gnashing of teeth and perusing of documentation, I found out that local file sources require the LOCAL keyword:
mysql> LOAD DATA LOCAL INFILE 'foo.csv' INTO TABLE bar FIELDS TERMINATED BY ',' ENCLOSED BY '#' LINES TERMINATED BY '\r' (a, b);
Query OK, 365 rows affected, 0 warnings (0.10 sec)
Hope this helps!