摘自:http://1.1lifes.sinaapp.com/?p=186


我是linux新手,安装软件也是胡乱安装,找了一篇文章。将mysql安装到一个特定文件下了,但后来压测handlersocket,mysql突然crash了。去启动怎么也启动不了,无奈呀!我安装mysql的文件夹在/opt/yq下,启动不了,自然去找错误日志了,但因为安装文件使用的默认方式,google了一下,说在按安装路径的data下,也确实找到了相关日志文件,文件名为***.err文件,发现里面的内容很旧,郁闷。说明后面启动mysql的错误日志没在这里。那在哪里呢?继续找,google后发现/data/mysql/下会有相关的日志,到里面后发现里面除了错误日志文件外还有数据文件,查看里面的错误日志:

111217 23:23:57  InnoDB: Database was not shut down normally!
 InnoDB: Starting crash recovery.
 InnoDB: Reading tablespace information from the .ibd files…
 InnoDB: Restoring possible half-written data pages from the doublewrite
 InnoDB: buffer…
 InnoDB: Last MySQL binlog file position 0 406839588, file name ./mysql-bin.000012
 111217 23:23:58  InnoDB: Waiting for the background threads to start
 111217 23:23:59 InnoDB: 1.1.8 started; log sequence number 3430959679
 handlersocket: not listening for reads
 handlersocket: not listening for writes
 handlersocket: initialized
 111217 23:23:59 [Note] Recovering after a crash using mysql-bin
 111217 23:24:04 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 749, event_type: 23
 111217 23:24:04 [Note] Starting crash recovery…
 111217 23:24:04 [Note] Crash recovery finished.
 /opt/yq/mysql/bin/mysqld: Disk is full writing

发现红色部分,原来是磁盘满了,狂晕!ll -lh查看了一下文件大小 mysql-bin 数据库备份文件太大了,删除,重启问题解决了,哈哈!不错!