Can't create/write to file 'INTO TABLE Impiegati;' (Errcode: 13 - Permission denied) code example
Example: mysql Can't create/write to file '/home/results.csv' (Errcode: 13 "Permission denied")
-- If you are using linux,
SELECT id, filename
INTO OUTFILE '/tmp/results.csv'
FROM attachments
-- and find the csv file /tmp