List:General Discussion« Previous MessageNext Message »
From:Sebastiaan van Erk Date:November 8 2009 9:21am
Subject:Temp file issues on Ubuntu 9.10
View as plain text  
Hi all,

I just recently upgraded to Ubuntu 9.10, but now I'm having all sorts of 
temp file problems. For example, when I try to delete a row and violate 
a contraint I get:

ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key 
constraint fails (temp file operation failed)

Instead of telling me which constraint is violated, it tells me the temp 
file creation failed. I have no reason why it failed, I don't see any 
error messages in the log.

To solve this problem I tried to make a tmpfs partition (I thought, 
maybe somehow my using ext4 might be a problem):

mkdir /tmpfs
mount -t tmpfs -o size=1g tmpfs /tmpfs
mkdir /tmpfs/mysql
chown mysql:mysql

and changed the tmpdir in the mysql config to /tmpfs/mysql

tmpdir=/tmpfs/mysql

But then mysql fails on startup:

/usr/sbin/mysqld: Can't create/write to file '/tmpfs/mysql/ibGgjPv7' 
(Errcode: 13)
091108 10:12:46  InnoDB: Error: unable to create temporary file; errno: 13
091108 10:12:46 [ERROR] Plugin 'InnoDB' init function returned error.
091108 10:12:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE 
failed.

I checked error code 13, which is permission denied, but I don't 
understand this, because if I change tmpdir to /tmp/mysql it does work, 
and I have:

$ ls -ld /tmp/mysql
drwxr-xr-x 2 mysql mysql 4096 2009-11-08 10:14 /tmp/mysql

$ ls -ld /tmpfs/mysql
drwxr-xr-x 2 mysql mysql 40 2009-11-08 10:12 /tmpfs/mysql

So I don't see the difference....

Has anyone encountered similar problems, or know what's going on here?

Best regards,
Sebastiaan


Attachment: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s
Thread
Temp file issues on Ubuntu 9.10Sebastiaan van Erk8 Nov
  • Re: Temp file issues on Ubuntu 9.10John List8 Nov
    • Re: Temp file issues on Ubuntu 9.10Sebastiaan van Erk8 Nov
      • Re: Temp file issues on Ubuntu 9.10Johnny Withers9 Nov
        • Re: Temp file issues on Ubuntu 9.10Sebastiaan van Erk9 Nov
  • Re: Temp file issues on Ubuntu 9.10Krishna Chandra Prajapati9 Nov
    • Re: Temp file issues on Ubuntu 9.10Sebastiaan van Erk9 Nov
      • Re: Temp file issues on Ubuntu 9.10Ananda Kumar10 Nov
        • Re: Temp file issues on Ubuntu 9.10Sebastiaan van Erk10 Nov