List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 1 1999 10:30pm
Subject:RE: Basic Data Import Query
View as plain text  
At 2:45 PM -0600 4/1/1999, Halton Internet wrote:
>Thanks Drew
>Yes it is unix and I get the same with
>mysql> load data infile '/www/vhtdocs/pet.txt'
>    -> into table kennels
>    -> fields terminated by ','
>    -> enclosed by '"'
>    -> lines terminated by '/r'
>    -> (name, address1, address2, town, county ,postcode ,bustype ,telephone
>    -> ,fax);
>ERROR 13: Can't get stat of '/www/vhtdocs/pet.txt' (Errcode: 2)

Is /www/vhtdocs/pet.txt located on the same machine the server is
running on?  If it's on the client host, and that's different
than the server host, you'll need LOAD DATA LOCAL INFILE.

If the file really is on the server host, what are its permissions?
If it's not readable to the UNIX user the server runs as, the LOAD
DATA statement will fail.  (For instance, if its mode is 400 or 600,
the statement will fail.)

By the way...
If your lines are terminated by carriage returns, you want \r, not /r.
(This has nothing to do with the file access problem, it's just
that you'll find your data aren't being read in properly otherwise.)

Paul DuBois, paul@stripped
Northern League Chronicles:
Basic Data Import QueryJon Halton1 Apr
  • Re: Basic Data Import QueryDrew M Hahn1 Apr
    • RE: Basic Data Import QueryHalton Internet1 Apr
      • Copying live filesBrandon Pulsipher1 Apr
        • Copying live filesMichael Widenius2 Apr
      • RE: Basic Data Import QueryPaul DuBois2 Apr
      • RE: Basic Data Import QueryMichael Widenius2 Apr
Re: Copying live filesjkraai2 Apr
RE: Copying live filesBrandon Pulsipher2 Apr