You try to do:
load data infile ‘/home/you/yourfile.txt’ into table lol (username, foo);
and it says:
ERROR 13 (HY000): Can’t get stat of ‘/home/you/yourfile.txt’ (Errcode: 2)
It’s a permissions problem. Even if you chmdo 777 the file it still won’t work. Move your file to /tmp and try it again:
load data infile ‘/tmp/yourfile.txt’ into table lol (username, foo);
Success!




August 13th, 2010 at 09:05
Thanks a lot for you suggestion, I was going crazy with this proble.
Can you explain me why it works using the tmp folder?
December 17th, 2010 at 00:12
I recently came across this issue. The problem is that it’s looking in the wrong path, likely something it isn’t able to write to (hence your /tmp workaround). Try doing the same thing, only using ‘outfile’ — it will be saved to /usr/…/…/ somewhere.
They need to make the error message a little more useful.