mysql的binlog日志太多了,占掉了磁盘很多空间。当磁盘空间满时MYSQL就会报错无法启动。 报错: /usr/local/mysql/bin/mysqld: Incorrect key file for table '/tmp/#sql_264_0.MYI'; try to repair it 121018 7:05:30 [ERROR] Got an error from unknown thread, /usr/local/src/mysql-5.5.25/storage/myisam/mi_write.c:223 121018 7:05:30 [ERROR] /usr/local/mysql/bin/mysqld: Incorrect key file for table '/tmp/#sql_264_4.MYI'; try to repair it 那么我们就要清理mysql的日志文件,来释放空间。 方法一如下: mysql> show binary logs;查看mysql bin-log日志 mysql> purge binary logs to 'binlog.000005'; (删除mysql bin-log日志,删除binlog.000005之前的,不包括binlog.000005) 方法二如下: rm -rf binlog.00005 kill 所有的mysql进程 重启MYSQL服务问题解决