I just ran into this issue as well. I had to add LOCAL
to my SQL statement.
For example, this gives the permission problem:
LOAD DATA INFILE '{$file}' INTO TABLE {$table}
Add LOCAL
to your statement and the permissions issue should go away. Like so:
LOAD DATA LOCAL INFILE '{$file}' INTO TABLE {$table}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…