How to change "tmpdir" on a running MySQL instance Is there a way to change the tmpdir on a MySQL server without restarting it?
The issue is that I use a tmpfs mounted at /var/lib/mysqltmp but sometimes it's overflowing and causes issues. I don't want to restart the server, because that means around 2-3 hours of service degradation.

Another possible exit from this situation is to unmount the tmpfs, but trying it causes this error:

 [root@db2 /]# umount /var/lib/mysqltmp/
 umount: /var/lib/mysqltmp: device is busy.
    (In some cases useful info about processes that use
     the device is found by lsof(8) or fuser(1))
Seems like there is no easy and unobtrusive way to do it. However there is a way to increase the size of the tmpfs.


Change the size in /etc/fstab accordingly
Issue a mount -o remount and it will be resized without a need to release file handle locks.