Translator
      English flagItalian flagKorean flagChinese (Simplified) flagChinese (Traditional) flagPortuguese flagGerman flagFrench flag
      Spanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flag
      Croatian flagDanish flagFinnish flagHindi flagPolish flagRomanian flagSwedish flagNorwegian flag
      Catalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flag
      Slovenian flagUkrainian flagVietnamese flagAlbanian flagEstonian flagGalician flagMaltese flagThai flag
      Turkish flagHungarian flagBelarus flagIrish flagIcelandic flagMacedonian flagMalay flagPersian flag
    Tag Cloud
    Sponsors
    Recent Comments
      Link with us

      IT Solutions Knowledge Base

      Copyright Protected
      256-bit Secured



MySQL export INTO OUTFILE triggers “Access de
Home » CentOS, Linux » MySQL export INTO OUTFILE triggers “Access denied for user”
By | 2 CommentsLeave a Comment
Last updated: Wednesday, April 27, 2011

When you try to export data to a file you are getting an access denied error message. Even if you grant the user with full privileges on the database you must Grant Global Permission to the specified user and set File Privileges to Yes as well in order to export data to a file.

mysql> select * INTO OUTFILE ‘/tmp/file.out’ from TABLE;
“ERROR 1045 (28000): Access denied for user ‘db_user’@'localhost’ (using password: YES)”

How To:

mysql -u root -p

1. use mysql;
2. update user set File_priv = ‘Y’ where User = ‘db_user’;
3. FLUSH PRIVILEGES;

Comments

2 comments
  1. Jessica
    April 18, 2012

    Great post, it resolved my problem !

    [Reply]

    Leave a reply
  2. sidirod
    June 24, 2012

    thank you!

    [Reply]

    Leave a reply

Leave a Comment

Add your picture!
Join Gravatar and upload your avatar. C'mon, it's free!