mysql> LOAD DATA INFILE '/home/myuser/myproject/power/ids-ads.txt' INTO TABLE ids_ads FIELDS TERMINATED BY 't' LINES TERMINATED BY 'n'; ERROR 29 (HY000): File '/home/myuser/myproject/power/ids-ads.txt' not found (Errcode: 13)
The file is there. I even pasted the path into the mysql console. The permissions are correct.
In fact, I even tested it on root user and root mysql.
-rw-r--r-- 1 myuser myuser 15893 2010-12-26 20:56 ids-ads.txt
Advertisement
Answer
Note that when you do LOAD DATA INFILE, MySQL is looking for that file on the server – not on your client machine.
If you want to use LOAD DATA INFILE to load a file that is on the client machine (and not the server machine), you must use LOAD DATA LOCAL INFILE.