mysqlload-data-infile

mysql load data infile can't get stat of file Errcode: 2


I have looked all over and found no solution, any help on this would be great.

Query:

LOAD DATA INFILE '/Users/name/Desktop/loadIntoDb/loadIntoDB.csv' 
INTO TABLE `tba`.`tbl_name` 
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES
(
field1, field2, field3
)

Error:

Can't get stat of '/Users/name/Desktop/loadIntoDb/loadIntoDB.csv' (Errcode:2)

NOTE:

I'm running MySQL Query browser on OSX 10.6.4 connecting to MySQL 5.x

Things I've tried:


Solution

  • try to use LOAD DATA LOCAL INFILE instead of LOAD DATA INFILE

    otherwise check if apparmor is active for your directory