Hi Sebastiaan,

Steps to fix the issue.
1. Do proper shutdown of mysql server.
2. Check the error log file that mysql server is shutdown properly.
3. Remove log files (ib_logfile0 and ib_logfile1).
4. Start mysql server (The log files will be created automatically)

Thanks,
Krishna

On Sun, Nov 8, 2009 at 2:51 PM, Sebastiaan van Erk <sebs...@sebster.com>wrote:

> 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
>
>

Reply via email to