长假归来,发现MySQL资料库不能启动,log中下:
130120 9:47:16 InnoDB: Started; log sequence number 0 4266237178
130120 9:47:16 [Note] Event Scheduler: Loaded 0 events
130120 9:47:16 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.52' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
130120 09:59:25 mysqld_safe Number of processes running now: 0
130120 09:59:25 mysqld_safe mysqld restarted
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130120 9:59:26 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...
130120 09:59:26 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
尝试重新启动mysql后,正常,再观察看是否还会异常。
130218 13:25:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130218 13:25:12 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...
130218 13:25:12 InnoDB: Started; log sequence number 0 4266240067
130218 13:25:12 [Note] Event Scheduler: Loaded 0 events
130218 13:25:12 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.52' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
有资料说,将my.cnf增加一行“innodb_force_recovery = 4”,让mysql强制恢复innodb,或使用“innodb_force_recovery = 3”,将数据表内容单个导出再新建库并汇入,应该就可以了,如果不行可以测试一下。
[root@ocs log]# cat /etc/my.cnf
innodb_force_recovery = 4
阅读(1900) | 评论(0) | 转发(0) |