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.
local_infile is on SHOW VARIABLES LIKE 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | ON |
+---------------+-------+
If not, restart mysqld with:
sudo ./mysqld_safe --local-infile
change you csv file to /tmp folder so that it mysqls can read it.
import to db
mysql> LOAD DATA INFILE '/tmp/a.csv' INTO TABLE table_a FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS;
Query OK, 18 rows affected (0.17 sec)
Records: 18 Deleted: 0 Skipped: 0 Warnings: 0