0
votes

after a few tweaks I've managed to enable LOAD DATA LOCAL INFILE in my phpmyadmin.

However, when I try the same query in php scripts, I get "The used command is not allowed with this MySQL version"

I already tried removing the "LOCAL" word but it doesn't work in mysql console either then, probably due to permission issues

I've already tried adding "128" at the end of the mysql_connect command, and apparmor is not running on the server so I'm out of ideas..

1

1 Answers

-1
votes

I managed to solve it thus:

  1. grant privileges in mysql
  2. edit open_basedir settings in order to be able to write in /tmp/
  3. use the /tmp/ folder to store the csv
  4. tell mysql to read /tmp/file.csv

For some reasons I couldn't use LOCAL, but this last-resort worked