报错如下:
ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_2c23_0.MAI' (Errcode: 2 "No such file or directory")
将临时表存放路径修改到数据存放路径/data/mysql
- mkdir /data/mysql/tmp
- chown mysql.mysql /data/mysql/tmp
- 修改/etc/my.cnf配置文件
[mysqld]
...
tmpdir=/data/mysql/tmp
...
- 重启mysql服务
systemctl restart mysqld
原文地址:http://blog.51cto.com/jschu/2079783
时间: 2024-10-05 03:09:51