2

Is there a something I am missing with LOCAL DATA INFILE?

My sql code,

LOAD DATA 
IGNORE INFILE 
'./infile.txt' 
INTO TABLE table 
FIELDS TERMINATED BY '\t'
LINES STARTING BY '\n'

The infile.txt is in the same directory as this script, I cannot use LOCAL my server won't let me, why is it not working? Is there a way I can check to see if I have it enabled?

I can run LOCAL from inside phpMyAdmin and the code works but only inserts 46 rows of about 500,000!

Thanks :)

5
  • What specific error is MySQL throwing? Commented May 22, 2012 at 15:37
  • Connection failed: SQLSTATE[28000]: Invalid authorization specification: 1045 Access denied for user 'web96-magnetmole'@'%' (using password: YES) Commented May 22, 2012 at 15:56
  • But I can do normal statements below it!! Commented May 22, 2012 at 15:57
  • It sounds like your user does not have 'FILE' privileges ... Commented May 22, 2012 at 19:36
  • Try this it work for me : [Cannot load data to MySQL database with LOAD DATA INFILE][1] [1]: stackoverflow.com/questions/11014508/… Commented Nov 16, 2012 at 18:51

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.