List:General Discussion« Previous MessageNext Message »
From:Joerg Bruehe Date:January 19 2011 8:10am
Subject:Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI'
View as plain text  
Hi everybody!

Peng Yu wrote:
> Hi,
> I run the following command. But I got the following error. I'm not
> sure what causes the problem. I have seen the same issue before, but
> it disappeared even I didn't take any action. Could anybody let me
> know how to fix the problem?
> mysql -ugenome mm9 -A
> mysql> select geneName as symbol, name as refSeq, chrom, strand,
> txStart, txEnd from refFlat group by refSeq having count(*)=1;
> ERROR 1 (HY000): Can't create/write to file
> '/var/lib/mysql/#sql_9e1_0.MYI' (Errcode: 13)

"Errcode" is what mySQL writes for an "errno" value.

First, you need to find out what the error number 13 means:

  joerg@machine:~$ fgrep 13 /usr/include/asm-generic/errno-base.h
  #define EACCES          13      /* Permission denied */

Then (unless you know that already), check the "man" pages to find when
the calls would return EACCESS. In this case, the candidate calls are
"creat()" and "write()".

  man 2 write
the output doesn't mention EACCESS.

  man 2 creat
will tell you this:
       EACCES The  requested  access  to  the file is not allowed, or search
              permission is denied for one of the directories  in  the  path
              prefix  of  pathname,  or the file did not exist yet and write
              access to the parent directory  is  not  allowed.   (See  also

So it is a permission issue for either the file, or the directory
hierarchy leading to it. See the other replies for the specific things
to check.


Joerg Bruehe,  MySQL Build Team,  joerg.bruehe@stripped
ORACLE Deutschland B.V. & Co. KG,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven
Amtsgericht Muenchen: HRA 95603

ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI'(Errcode: 13)Peng Yu18 Jan
  • Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI'(Errcode: 13)Yogesh Kore18 Jan
    • Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI'(Errcode: 13)sushant chawla18 Jan
      • Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI'(Errcode: 13)Johan De Meersman18 Jan
  • Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI'(Errcode: 13)Joerg Bruehe19 Jan