1

I'm running the following command within PHPmyadmin:

LOAD DATA INFILE '/test3.csv' INTO TABLE temp_car FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES (recloc,divdept)

AND

LOAD DATA INFILE '/var/www/vhosts/domain.com/httpdocs/admin/server/test3.csv' INTO TABLE temp_car FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES (recloc,divdept)

i get this error:

#1045 - Access denied for user 'db_admin'@'%' (using password: YES) 

I've tried changing the permissions to the file to 777 and the containing folder to 777.

Any ideas? I'm having a terrible time getting a working test with LOAD DATA INFILE

1 Answer 1

2

"For security reasons, when reading text files located on the server, the files must either reside in the database directory or be readable by all. Also, to use LOAD DATA INFILE on server files, you must have the FILE privilege."

3
  • Thanks! but wouldn't setting the permission to 777 be readable by all?
    – Stephen S.
    Commented Dec 14, 2010 at 19:37
  • 1
    Do you have the FILE privilege as well? Commented Dec 14, 2010 at 19:38
  • No sir, i am unfamiliar with this. (researching now)
    – Stephen S.
    Commented Dec 14, 2010 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.