Karl Krelove wrote:
David Logan wrote:
Karl Krelove wrote:
I'm trying to import a large amount of data from an Access database
containing information about 9,000+ students in a school system.
I've created a table 'student_list' to hold the data and issued the
following command:
LOAD DATA INFILE 'home/karl/Student_List.csv' into table
student_list FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES
TERMINATED BY '\n';
In response I get: ERROR 13 (HY000): Can't get stat of
'/var/lib/mysql/home/karl/Student_List.csv' (Errcode: 2)
I've looked up the error on the MySQL website and found the error
listed as Error 1013 in the listing of server errors for MySQL 4.1,
but I can't find an explanation.
1st question - the obvious one - does anyone know what is triggering
the error?
2nd question - why does MySQL only list the errors? I could already
read what it said in the CLI client. Is there a place on the web
site that actually explains what specific errors mean?
Thanks in advance for any input.
Karl Krelove
Hi Karl,
Do you have your home directories under the mysql path? When you are
doing a LOAD DATA INFILE the following rules (from the manual) apply
to the pathname
<large snip>
I suspect, based on these rules, it will be looking for the file
relative to /var/lib/mysql as it states in the error message.
Further info is available at
http://dev.mysql.com/doc/refman/5.0/en/load-data.html
Regards
My first reaction as I read your response was "But I had just run a
LOAD INFILE command on another table from the same database - same
directory, same command, nothing different except the filename and the
table name - with no path problem." Then I looked a little closer at
the LOAD INFILE I pasted into this message. What a difference a single
slash can make! When I re-ran the command in MySQL using the same path
but with a slash at the _beginning_ - '/home/karl/Student_List.csv' -
it worked and the data was imported in about a hundredth of a second!
Thanks for pointing me toward a path problem. Does "Can't get stat"
translate to "File not found?" And as for my other general question,
is there a resource online (or even in a bound manual) that actually
explains MySQL error messages? There is that huge listing on the MySQL
website that _lists_ a gazillion errors and their numeric codes, but
no links to explanations.
Thanks again.
Karl
Hi Karl,
There are many many error codes unfortunately. I don't know of any
specific resource, however in the manual there are a couple of the
appendices that can be very useful, appendix A especially. I find that I
just have to read the manual for the command that I have issues with
otherwise.
"Can't get stat" indeed means as you thought. A stat is a unix system
function that returns details on the file, eg: ownership, group, size,
date last modified etc. It is telling you it can't find it to retrieve
the info required.
Pleased to see it all worked ok.
Regards
--
David Logan
South Australia
when in trouble, or in doubt
run in circles, scream and shout
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]