mysql每次都可以正常启动,今天突然无法启动了

tang_go 2009-02-17 10:59:24
日志信息是这样的:
这是正常启动时候的信息:
090216 14:46:03 mysqld started
090216 14:46:03 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...
090216 14:46:03 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 18825290.
InnoDB: Doing recovery: scanned up to log sequence number 0 18825290
InnoDB: Last MySQL binlog file position 0 1797119, file name ./mysql-bin.000031
090216 14:46:04 InnoDB: Started; log sequence number 0 18825290
090216 14:46:04 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.22' socket: '/var/run/mysql/mysql.sock' port: 3306 Source distribution
紧接着就是今天的日志信息,报错了
090217 08:35:43 mysqld started
090217 8:35:43 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: Error: tried to read 16384 bytes at offset 0 819200.
InnoDB: Was only able to read -1.
090217 8:36:19 InnoDB: Operating system error number 5 in a file operation.
InnoDB: Error number 5 means 'Input/output error'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/mysql/en/Operating_System_error_codes.html
InnoDB: File operation call: 'read'.
InnoDB: Cannot continue operation.
090217 08:36:19 mysqld ended
--------后来又尝试几次,都是报同样的日志信息
没找到类似的错误信息和解决办法,望高手不吝指教!


...全文
1431 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
ITdagun 2011-04-18
  • 打赏
  • 举报
回复
我的mysql是因为掉电,就出现此问题了,遇到很多次,最后是重新建立数据库的。没有找到其他方法啊。
feiyanglove 2009-02-28
  • 打赏
  • 举报
回复
不懂 学习下
tang_go 2009-02-27
  • 打赏
  • 举报
回复
初步断定是ibdata1文件有错误
无法修复问题,数据丢失
zhaolinjnu 2009-02-27
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 tang_go 的回复:]
InnoDB: buffer...
090216 14:46:03 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 18825290.

InnoDB: buffer...
InnoDB: Error: tried to read 16384 bytes at offset 0 819200.
InnoDB: Was only able to read -1.
对比一下正常日志和错误日志,发现就是在buffer...时出错的
大家知道buffer的时候,是在读取哪个文件吗?
[/Quote]

innodb tablespace表空间里的数据文件,可能是第一个吧,这个不太清楚。
zhaolinjnu 2009-02-27
  • 打赏
  • 举报
回复
090217 8:35:43 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: Error: tried to read 16384 bytes at offset 0 819200.
InnoDB: Was only able to read -1.

有一些page有部份写入(such as os crash),但又因为一些原因,无法读取double write buffer指定位置里的数据,来恢复损坏的页。
使得整个数据库没有办法继续往前做恢复。
ljf_ljf 2009-02-27
  • 打赏
  • 举报
回复
1 你肯定操作过什么才会关闭数据库服务,请提供你关闭数据服务后做了什么操作。
2 从你错误日志看,有可能是下面问题造成
@文件损坏造成。但不太确定。
@换过硬件或者修改过磁盘阵列之类的。
@磁盘损坏了
@异常关闭导致MySQL 文档损坏。

处理方法:
1 有备份不?用备份加上二进制日志恢复数据
2 没有备份 ,就完全使用二进制恢复。

以上内容纯属个人意见。
smile0102 2009-02-27
  • 打赏
  • 举报
回复
非正常关机导致文件损坏!
jiahehao 2009-02-27
  • 打赏
  • 举报
回复
没见过此问题,呼唤涛涛~~~~~
tang_go 2009-02-17
  • 打赏
  • 举报
回复
mysql-bin.00*文件都是完好的,
不会是ibdata1文件出错了吧
tang_go 2009-02-17
  • 打赏
  • 举报
回复
InnoDB: buffer...
090216 14:46:03 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 18825290.

InnoDB: buffer...
InnoDB: Error: tried to read 16384 bytes at offset 0 819200.
InnoDB: Was only able to read -1.
对比一下正常日志和错误日志,发现就是在buffer...时出错的
大家知道buffer的时候,是在读取哪个文件吗?

56,677

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧