Recently on one of the prodcution servers we have seen the replication being stopped due to the space issues on the /tmp
drive which is having less space allocated.
I would like to move the tmpdir
from /tmp[default]
to /var/lib/mysql/tmp
Below are what I guess I should do.
- stop mysql
- create directory called
tmp
in the location/var/lib/mysql/
- add
tmpdir = /var/lib/mysql/tmp/
- start mysql
Is there anything to be taken care of for the permission level of /var/lib/mysql/tmp/
?
Best Answer
You can combine 1. to 4. by restarting MySQL after changing.
About 2., you should put the
tmpdir
outside of thedatadir
.chown mysql:mysql /path/to/tmp/dir
is enough.