[root@localhost ~]# df -h 查看是否空间不足
在查看mysql数据目录情况
mysql> show variables like '%dir%';
+-----------------------------------------+------------------------------------+
| Variable_name | Value |
+-----------------------------------------+------------------------------------+
| basedir | /usr/local/mysql |
| binlog_direct_non_transactional_updates | OFF |
| character_sets_dir | /usr/local/mysql/share/charsets/ |
| datadir | /usr/local/mysql/data/ |
| innodb_data_home_dir | /data/mysql/data |
| innodb_log_group_home_dir | /data/mysql/data |
| innodb_max_dirty_pages_pct | 75 |
| lc_messages_dir | /usr/local/mysql/share/ |
| plugin_dir | /usr/local/mysql/lib/mysql/plugin/ |
| slave_load_tmpdir | /tmp |
| tmpdir | /tmp |
+-----------------------------------------+------------------------------------+
11 rows in set (0.01 sec)
[mysqld]
...
tmpdir=/data/mysql
slave_load_tmpdir=/data/mysql
然后调整变量“tmpdir”和“slave_load_tmpdir”,然后重启mysql服务