MySQL File Access, Access Denied

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';


Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Related Posts

Tags: ,

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





Donate

If you found this article useful and would like to see more like it this please consider making a donation.