Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI' (Errcode: 13)

2011-01-19 Thread Joerg Bruehe
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 -hgenome-mysql.cse.ucsc.edu 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:
  ERRORS
   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
  path_resolution(7).)


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.


Regards,
Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@oracle.com
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


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI' (Errcode: 13)

2011-01-18 Thread Johan De Meersman
On Tue, Jan 18, 2011 at 6:24 AM, sushant chawla  wrote:

> Make sure the following things:
>
>
>   - /tmp folder is having 1777 permissions
>   - mysql folder is having the ownership from which it is running. Refer
>   /etc/my.cnf
>   - Make sure you have space on your MySQL partition
>

Also, make sure you have room where MySQL puts it's temp files (possibly
/tmp or /var/tmp, check "show global variables like '%tmpdir%';"). This may
mean that the server couldn't write a temporary sorting file or something
similar to disk.


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel


Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI' (Errcode: 13)

2011-01-17 Thread sushant chawla
Make sure the following things:


   - /tmp folder is having 1777 permissions
   - mysql folder is having the ownership from which it is running. Refer
   /etc/my.cnf
   - Make sure you have space on your MySQL partition

Regards
Sushant Chawla




On Tue, Jan 18, 2011 at 10:51 AM, Yogesh Kore  wrote:

> May be db files are not as MySQL user. Check owner ship for the files of
> the
> table.
> It should be mysql user ownership.
>
> On Tue, Jan 18, 2011 at 6:36 AM, 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 -hgenome-mysql.cse.ucsc.edu 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)
> >
> > --
> > Regards,
> > Peng
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/mysql?unsub=yogeshk...@gmail.com
> >
> >
>


Re: ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI' (Errcode: 13)

2011-01-17 Thread Yogesh Kore
May be db files are not as MySQL user. Check owner ship for the files of the
table.
It should be mysql user ownership.

On Tue, Jan 18, 2011 at 6:36 AM, 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 -hgenome-mysql.cse.ucsc.edu 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)
>
> --
> Regards,
> Peng
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=yogeshk...@gmail.com
>
>