MySQL File Access, Access Denied

December 31st, 2008 | Posted in MySQL
2

If you need to access files for importing directly from MySQL you may have encountered an error stating the following.

Access denied for user: 'user@localhost' (Using password: YES)

The user used to execute the import needs the FILE privilege in order to complete a command similar the one below.

LOAD DATA INFILE filename
INTO TABLE products
FIELDS TERMINATED BY '|'
LINES TERMINATED BY '\n';

Use the following command within MySQL to grant the FILE privilege.

GRANT FILE ON *.* TO 'mysql_user'@'localhost';

Related posts

Comments (2)

  1. [...] unknown wrote an interesting post today onMySQL File Access, Access Denied | Website Builders ResourceHere’s a quick excerptElephants ready to party as eBay ban approaches. Mon, 29 Dec 2008 09:04:00 PST Cyber barter site is set to put into effect a worldwide ban on ivory products on Jan. 1, a move animal rights advocates hope will slow the illegal trade in … [...]

  2. [...] unknown wrote an interesting post today onMySQL File Access, Access Denied | Website Builders ResourceHere’s a quick excerptElephants ready to party as eBay ban approaches. Mon, 29 Dec 2008 09:04:00 PST Cyber barter site is set to put into effect a worldwide ban on ivory products on Jan. 1, a move animal rights advocates hope will slow the illegal trade in … [...]

Leave a Reply