SELECT * FROM mydb.mytable INTO OUTFILE '/tmp/123.csv';In some cases, you'll see this error message:
Access denied for user 'dbuser'@'localhost' (using password: YES)That means the mysql user you used is no privilege to write file.
Solution is to add FILE privilege into this user
GRANT FILE ON *.* TO 'dbuser'@'localhost';
No comments:
Post a Comment