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

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

am 18.01.2011 02:06:59 von PengYu.UT

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=gcdmg-mysql-2@m.gmane.org

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

am 18.01.2011 06:21:54 von Yogesh Kore

--20cf30433ee81dbe5f049a181451
Content-Type: text/plain; charset=ISO-8859-1

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=yogeshkore@gmail.com
>
>

--20cf30433ee81dbe5f049a181451--

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

am 18.01.2011 06:24:49 von sushant chawla

--00221532c7ccc5dbe7049a181f63
Content-Type: text/plain; charset=ISO-8859-1

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=yogeshkore@gmail.com
> >
> >
>

--00221532c7ccc5dbe7049a181f63--

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

am 18.01.2011 15:04:10 von Johan De Meersman

--0015174be640e7aed2049a1f5fe8
Content-Type: text/plain; charset=ISO-8859-1

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

--0015174be640e7aed2049a1f5fe8--

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

am 19.01.2011 09:10:45 von Joerg Bruehe

Hi everybody!


Peng Yu wrote:
> Hi,
>=20
> 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?
>=20
> mysql -ugenome -hgenome-mysql.cse.ucsc.edu mm9 -A
>=20
> mysql> select geneName as symbol, name as refSeq, chrom, strand,
> txStart, txEnd from refFlat group by refSeq having count(*)=3D1;
> ERROR 1 (HY000): Can't create/write to file
> '/var/lib/mysql/#sql_9e1_0.MYI' (Errcode: 13)
>=20

"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 sea=
rch
permission is denied for one of the directories in the p=
ath
prefix of pathname, or the file did not exist yet and wr=
ite
access to the parent directory is not allowed. (See a=
lso
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

--=20
Joerg Bruehe, MySQL Build Team, joerg.bruehe@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=3Dgcdmg-mysql-2@m.gmane.o rg