This tutorial explains how you can change or move MySQL /tmp directory to a new location on a server / VPS. Login as root to your server via SSH.
nano /etc/my.cnf
tmpdir=/home/mysqltmp
To save file press: Ctrl + O
To exit from nano editor press: Ctrl + X
This will set new location of MySQL tmp to /home/mysqltmp. You may change to any different location.
mkdir /home/mysqltmp chmod 1777 /home/mysqltmp
/etc/init.d/mysql restart
mysqladmin var | grep tmpdir
This should show following return.
| slave_load_tmpdir | /home/mysqltmp | tmpdir | /home/mysqltmp