Can't import csv file

stulancs

New member
Joined
Apr 24, 2011
Messages
2
Hello.

I'm trying to import a .csv file into a table called sets on a database called sle. However, when I do that using Load Data, it says:

SQL query:

LOAD DATA INFILE '/tmp/phptRZbTv' INTO TABLE `sets` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n'

MySQL said: Documentation
#1085 - The file '/tmp/phptRZbTv' must be in the database directory or be readable by all

I have literally no idea what this means. My /tmp folder is 777. Other than that I can't see what the problem is. What do I do?
 
It is also a default install for many most distro's Linux.

The error message is pretty self explanatory. The file's permissions needs to be readable by all not the directory it is in (i.e. 'chmod a+r filename'). The other option would be to have this file reside in the database directory.

I am sure if you did a google search on this error, you would come up with a ton of things you could do to fix this problem.
 
Back
Top