|
Today, I suddenly received a warning message that is / disk space usage exceeds a threshold. After a look and found there are many abnormal SQL, execution can not, cause has been processed to produce a temporary occupation of / tmp disk space.
Because the operating system / tmp space is limited, we need to modify the parameters, the value of the path tmpdir be modified.
mysql> show variables like 'tmpdir';
+ --------------- + ------- +
| Variable_name | Value |
+ --------------- + ------- +
| Tmpdir | / tmp |
+ --------------- + ------- +
1 row in set (0.00 sec)
mysql> set global tmpdir = '/Data/app/mysql5.6.25/mysqltmp';
ERROR 1238 (HY000): Variable 'tmpdir' is a read only variable
It can only be changed through the configuration file.
Restart mysql
mysql> show variables like 'tmpdir';
+ --------------- + -------------------------------- +
| Variable_name | Value |
+ --------------- + -------------------------------- +
| Tmpdir | /mysql5.6/var/tmp |
+ --------------- + -------------------------------- +
1 row in set (0.00 sec) |
|
|
|