Red Hat Bugzilla – Bug 962087
mysql and tmp on tmpfs
Last modified: 2013-06-05 22:23:33 EDT
+++ This bug was initially created as a clone of Bug #905635 +++
Description of problem:
Default my.cnf doesn't point mysql to use /var/tmp and this caused mysqldump, mysql_upgrade and others to fail on my system.
Version-Release number of selected component (if applicable):
always, on one of my system
Steps to Reproduce:
1. run mysqldump or mysql_upgrade on a system with a small /tmp on tmpfs
Fails with a message containing
Can't create/write to file '/tmp/#sql_60e_0.MYI' (Errcode: 2)
working as before
Googling for the error message shows workaround as adding
--- Additional comment from Tom Lane on 2013-01-29 17:20:28 EST ---
TBH, fixing this in mysql is the Wrong Thing. F18's choice to put /tmp on tmpfs by default is questionable even on personal/laptop systems, and utterly brain-dead for servers. I'd recommend turning it off system-wide rather than hacking applications one at a time. See https://fedoraproject.org/wiki/Features/tmp-on-tmpfs
--- Additional comment from Henrique Martins on 2013-01-29 17:53:39 EST ---
Understood, and I actually already disabled this to take effect as of the next reboot of the machine where I had this problem.
However, as far as I can find with google, it seems that Fedora/FESCO is going to keep this going forward, so someone needs to file bug reports for every single application, for the benefit of people that won't turn it off.
--- Additional comment from Honza Horak on 2013-01-31 09:24:50 EST ---
According to  having TMPDIR on tmpfs can cause even bigger troubles in mysql in case of replication slave. If we won't concern a possibility of reverting that F18 feature (I don't believe that happens), I'd vote to change mysql's default to /var/tmp.
Then in case somebody believes /tmp will mean a performance improvement for him and limited space wouldn't be an issue, one can always define tmpdir variable in the my.cnf file. For most of cases /var/tmp should be good enough.
--- Additional comment from Honza Horak on 2013-02-11 09:10:27 EST ---
Created attachment 696099 [details]
Make tmpdir a configurable option
I've sent the attached patch to MySQL and MariaDB upstreams. It adds ability to specify tmpdir using "-DTMPDIR=/var/tmp" during build configuration.
--- Additional comment from Fedora Admin XMLRPC Client on 2013-05-09 10:02:59 EDT ---
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Committed in git.
mariadb-5.5.31-1.fc19 has been submitted as an update for Fedora 19.
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-5.5.31-1.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
mariadb-5.5.31-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.