If anyone is still interested on my status on that: I got it working!
I did not get it working with “LOAD DATA INFILE”, but I did get “LOAD DATA LOCAL INFILE” working.
To get Piwik to use the keyword “LOCAL”, you have to disable the php-options “open_basedir” and “safe_mode”.
This is only of value to you, if it works on the commandline. Try to execute the following code in your commandline and see if it works. If yes, read on. If no, fix that first!
Replace the path and the filename to your needs.
$ mysql -u root -p --local-infile piwik
mysql> LOAD DATA LOCAL INFILE '/path-to-your-piwik-installation/tmp/assets/option-somehash.csv' REPLACE INTO TABLE `option` CHARACTER SET latin1 FIELDS TERMINATED BY ' ' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY ' ' (option_name,option_value) ;
Now, you should still get the same error as @minos.
While reading the code, I found a hint to a PHP bugreport where this error occures when using PDO as driver for MySQL. Replacing it by MySQLi is a workaround, that’s worth testing.
So, I updated my Piwik-configuration and added the following line:
adapter = MYSQLI
After that, it worked like a charm!
Read here for details (German only)
http://forum.piwik.org/read.php?5,102235