时间:2021-07-01 10:21:17 帮助过:67人阅读
由于操作系统的/tmp空间有限,需要进行参数修改,将tmpdir的值路径进行修改。
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
只能通过配置文件进行修改了。
重启mysql
mysql> show variables like 'tmpdir'; +---------------+--------------------------------+ | Variable_name | Value | +---------------+--------------------------------+ | tmpdir | /mysql5.6/var/tmp | +---------------+--------------------------------+ 1 row in set (0.00 sec)
问一下:但是生产环境不能重启服务,这要怎么搞呢?