Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5474820
  • 博文数量: 890
  • 博客积分: 12876
  • 博客等级: 上将
  • 技术积分: 10760
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-04 14:18
个人简介

猝然临之而不惊,无故加之而不怒。

文章分类

全部博文(890)

文章存档

2016年(1)

2014年(18)

2013年(41)

2012年(48)

2011年(65)

2010年(84)

2009年(121)

2008年(101)

2007年(129)

2006年(95)

2005年(118)

2004年(69)

分类: Mysql/postgreSQL

2013-02-18 14:08:32


长假归来,发现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



阅读(14172) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~