I am trying to create an export of csv data from mysql using the following query:
SELECT * INTO OUTFILE '/tmp/result.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM getfreepellets WHERE 1
And I get the following error:
#1045 - Access denied for user '[username]'@'localhost' (using password: YES)
(username removed but correct)
How can I provide access to this user to create a file on the server?
Edit:
I changed the first line to be my exact home path, and got the same error.
source
share