MySQL Forums
Forum List  »  Install & Repo

tmpdir permissions problem?
Posted by: Stephen Worthington
Date: May 14, 2016 04:17AM

I am running mysql 5.5.49-0ubuntu0.14.04.1 on a Mythbuntu 14.04 system. Yesterday, I ran into a problem where my system partition was too small for the temporary files created when the MythTV optimise_db script runs, which does REPAIR TABLE and OPTIMIZE TABLE commands on all tables in the MythTV database, including the huge recordedseek table. So I thought it should be simple to change where mysql puts its temporary files, by altering the tmpdir setting. The current tmpdir setting (in /etc/my.conf) is:

tmpdir = /tmp

and I overrode that by adding a new tmpdir setting in /etc/mysql/conf.d/mythtv-tweaks-jsw.conf file:

tmpdir = /mnt/rec3/tmp

When I restarted mysql, it failed to start and this was in /var/log/mysql/error.log:

/usr/sbin/mysqld: Can't create/write to file '/mnt/rec3/tmp/ibayJP7i' (Errcode: 13)

The /mnt/rec3/tmp directory exists and has the same permissions and ownership as the /tmp directory:

# ll -d /tmp
drwxrwxrwt 7 root root 12288 May 14 22:06 /tmp/

# ll -d /mnt/rec3/tmp
drwxrwxrwt 3 root root 8 May 14 15:50 /mnt/rec3/tmp/

and the /mnt and /mnt/rec3 directories also have full permissions:

# ll -d /mnt
drwxrwxrwx 31 root root 4096 Apr 23 00:10 /mnt/

# ll -d /mnt/rec3
drwxrwxrwx 11 root root 4096 May 14 14:25 /mnt/rec3/

So does anyone have any idea why this does not work? And how I can get mysql to use a different tmp directory?

Options: ReplyQuote


Subject
Written By
Posted
tmpdir permissions problem?
May 14, 2016 04:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.