if you are getting error on site due to tmp of full or getting emails Drive Critical: /dev/loop0 (/var/tmp) is 97% full
then you have to follow steps below.
First you have to resize the tmp partation
Edit /scripts/securetmp
and fine the line my $tmpdsksize
Change to this line for 2GB:
Save the file then run these commands to resize /tmp partition:
You can use the following steps to move the MySQL /tmp directory location:
Place the following line into the file under the [mysqld] section:
Save the file
2. Create the /mysqltmp directory
3. Restart MySQL and check that the tmpdir is now /mysqltmp
You should see the following return:
This presumes / partition itself has sufficient space. I would like to hope / partition would have more space than /tmp was provided on most systems.
then you have to follow steps below.
First you have to resize the tmp partation
Edit /scripts/securetmp
Code:
nano /scripts/securetmp
Code:
my $tmpdsksize = 512000; # Must be larger than 250000
Change to this line for 2GB:
Code:
my $tmpdsksize = 2097152; # Must be larger than 250000
Code:
umount -l /tmp umount -l /var/tmp rm -fv /usr/tmpDSK /scripts/securetmp
Code:
nano /etc/my.cnf
Code:
tmpdir=/mysqltmp
2. Create the /mysqltmp directory
Code:
mkdir /mysqltmp chmod 1777 /mysqltmp
Code:
/etc/init.d/mysql restart mysqladmin var | grep tmpdir
Code:
mysqladmin var | grep tmpdir | slave_load_tmpdir | /mysqltmp | tmpdir | /mysqltmp