How do I grant FILE privilege(s) to a user?
Posted by:
Karen x
Date: May 08, 2019 12:51PM
macOS High Sierra 10.13.6
MySQL Community Server 8.0.15
Using a SELECT INTO ... OUTFILE 'file_name' query to output a table to a csv file returned the following error message:
Error 1227 (42000): Access denied; you need (at least one of) the FILE privilege(s) for this operation
How do I grant file privileges for outputting and inputting data to and from files for this user?
When I created this user and granted privileges, I used the following statements:
* CREATE USER 'lrngsql'@'localhost' IDENTIFIED BY 'xyz’;
* GRANT ALL PRIVILEGES ON bank.* TO 'lrngsql'@'localhost' WITH GRANT OPTION;