原来一切正常,但是近来mysql收到巨大的查询,经常导致服务器宕机,从昨天开始mysql的InnoDB不能使用,所有使用InnoDB引擎的数据库全部不能读取,刚开始以为数据库损坏,但是恢复备份以后依旧存在,同时mysql的my.cnf没有经过修改,默认是支持InnoDB的。
081011 19:40:01 mysqld started
InnoDB: Error: log file ./ib_logfile0 is of different size 0 268435456 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
081011 19:40:01 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.45-log' socket: '/var/lib/mysql/mysql.sock' port: 0 Source distribution
ib开头的日志文件按照网上大家说的清除过,但是无效,清除日志以后重启的日志如下
081011 19:53:58 mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
081011 19:53:58 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
081011 19:53:58 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
081011 19:53:58 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
081011 19:53:59 InnoDB: Started; log sequence number 0 0
081011 19:53:59 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.45-log' socket: '/var/lib/mysql/mysql.sock' port: 0 Source dist
ribution
但是再次重启依然会出现
InnoDB: Error: log file ./ib_logfile0 is of different size 0 268435456 bytes这样错误。
访问使用InnoDB的数据库会得到如下日志:
081011 19:54:54081011 19:54:54 [ERROR] Cannot find table wiki/page from the
internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you
have deleted and recreated InnoDB data files but have forgotten
to delete the corresponding .frm files of InnoDB tables, or you
have moved .frm files to another database?
See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html
how you can resolve the problem.
服务器系统是centos 5.2 x86_64 内存2G 系统设置都是默认的。