[Techtalk] mysqlimport error- can't get stat

Malcolm Tredinnick malcolm at commsecure.com.au
Wed Jan 1 13:52:33 EST 2003


On Tue, Dec 31, 2002 at 11:03:24AM -0500, Nicki Handy wrote:
> I'm having a problem with mysqlimport. I get a permissions error 13 when
> trying to use mysqlimport as well as LOAD DATA INFILE from within mysql.
> I tried logging on as root to both the machine and mysql. I also gave
> full permissions to user group and other to read,write,execute. 
> 
>  
> 
> Here is the error:
> 
> ERROR 13: Can't get stat of ' /.mypath/countries.txt' (Errcode: 13)

I have not seen this particular error before, but I do not use MySQL as
much these days as I used to. Here are a couple of ideas off the top of
my head, though:

(1) Error code 13 is access problems, usually associated with
permission problems. The mysqld program is often started via safe_mysqld
and runs as the mysql user. So the file above may very well have to be
readable by the mysql user.

(2) If the file is readable by the correct user, is it possible for the
mysql user to get to that file. All directories above the file must
provide execute permissions (the 'x' bit in the directory permissions)
for the appropriate user. So, if the mysql user is involved, you may
need to 'chmod o+x .mypath' or something similar (this particular
solution brought to you by analogy with similar problems one often sees
with Apache plugins).

Like I said, these may have nothing to do with the problem, but paranoid
permission checking on files that they read is fairly typical of
databases since otherwise there are lots of security holes to exploit.

I am kind of assuming you made a typo in the path above, too, and it is
really ./mypath/countries.txt. Or do you really have a directory called
.mypath in / ?

Cheers,
Malcolm

-- 
I intend to live forever - so far so good.



More information about the Techtalk mailing list