Be wary of the mysql file_priv
permission. First, it is only set for a given user if it is set “globally”, ie, to *.*
. Even if you have a user, such as piwik, set up with grant all privileges to piwik_user@'%' on piwik.* ;
, the file
privilege will not be granted. Rather, you must run it on the entire database: grant file to piwik_user@'%' on *.*
. You can test to see if the user has the privilege: select user,host,file_priv from mysql.user
to see if your particular user has the ability or not.