In my remote MySQL, when I try to execute this query, I am getting the MySQL Error Code : 13.
Query -
LOAD DATA INFILE
\'/httpdocs/.../.../testFile.
for Ubuntu users
I'm running mysql 5.6.28 on Ubuntu 15.10 and I just ran into the exact same problem, I had all the necessary flags in my.cnf tmpdir = /tmp local-infile=1 restarted mysql and I would still get LOAD DATA INFILE Error Code : 13
Just like Nelson mentionned the issue was "apparmor", sort of patronising mysql about permissions, I then found the solution thanks to this quick & easy tutorial.
basically, assuming your tmp dir would be /tmp :
Add new tmpdir entries to /etc/apparmor.d/local/usr.sbin.mysqld
sudo nano /etc/apparmor.d/local/usr.sbin.mysqld
*add this
/tmp/ r,
/mnt/foo/tmp/** rw,
Reload AppArmor
sudo service apparmor reload
Restart MySQL
sudo service mysql restart
I hope that'll help few Ubuntu-ers