日志信息是这样的:
这是正常启动时候的信息:
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
--------后来又尝试几次,都是报同样的日志信息
没找到类似的错误信息和解决办法,望高手不吝指教!

解决方案 »

  1.   

    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的时候,是在读取哪个文件吗?
      

  2.   

    mysql-bin.00*文件都是完好的,
    不会是ibdata1文件出错了吧
      

  3.   

    初步断定是ibdata1文件有错误
    无法修复问题,数据丢失
      

  4.   

    1 你肯定操作过什么才会关闭数据库服务,请提供你关闭数据服务后做了什么操作。
    2 从你错误日志看,有可能是下面问题造成
      @文件损坏造成。但不太确定。
      @换过硬件或者修改过磁盘阵列之类的。
      @磁盘损坏了
      @异常关闭导致MySQL 文档损坏。处理方法:
    1 有备份不?用备份加上二进制日志恢复数据
    2 没有备份 ,就完全使用二进制恢复。以上内容纯属个人意见。
      

  5.   

    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指定位置里的数据,来恢复损坏的页。
    使得整个数据库没有办法继续往前做恢复。
      

  6.   


    innodb tablespace表空间里的数据文件,可能是第一个吧,这个不太清楚。
      

  7.   

    我的mysql是因为掉电,就出现此问题了,遇到很多次,最后是重新建立数据库的。没有找到其他方法啊。