MySQL Forums
Forum List  »  Newbie

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;

Options: ReplyQuote


Subject
Written By
Posted
How do I grant FILE privilege(s) to a user?
May 08, 2019 12:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.