Chinaunix首页 | 论坛 | 博客
  • 博客访问: 200720
  • 博文数量: 87
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 840
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-18 21:12
文章分类

全部博文(87)

文章存档

2014年(86)

我的朋友

分类: Mysql/postgreSQL

2014-06-19 11:40:29


长假归来,发现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) |
给主人留下些什么吧!~~