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.
I had a lot of trouble to fix this, there are two things to do :
update file /etc/mysql/my.cnf with local-infile =1 at two locations after [mysql] paragraphs (this allows to use LOCAL INFILE sql command).
update via sudo gedit /etc/apparmor.d/usr.sbin.mysqld so apparmor will allow you to write into the special files of /var/www/ by adding the lines:
/name of your directory/ r,
/name of your directory/* rw,
The name of your directory can be as /var/www/toto/ (this allows to use the directory where your files are located).