1,查看Mysqld(/var/log/mysqld.log)日志,发现以下错误:
InnoDB: Error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0
5242880 bytes
InnoDB: than specified in the .cnf file 0 104857600 bytes!
030826 1:42:15 Can't init databases
030826 1:42:15 Aborting
2,解决办法
"
If you want to change the number or the size of your InnoDB log files, you
have to shut down MySQL and make sure that it shuts down without errors.
Then copy the old log files into a safe place just in case something went
wrong in the shutdown and you will need them to recover the database. Delete
then the old log files from the log file directory, edit my.cnf, and start
MySQL again. InnoDB will tell you at the startup that it is creating new log
files.
"
在你修改my.cnf的innodb_log_file_size参数前,请先停止mysql服务程序的运行(mysql的停止没有出现任何错误),并把/var/lib/mysql目录下的ib_logfile0、ib_logfile1、ib_logfile2等之类的文件移除到一个安全的地方(旧日志文件的保留是为了防止意外的出现),以便Mysql重启后可以将新的ib_logfile0之类日志文件生成到/var/lib/mysql目录下。如果没有什么意外,旧的日志文件可以删除。
分享到:
相关推荐
当遇到"InnoDB Error ib_logfile0 of different size"错误时,意味着MySQL在启动时检测到当前的InnoDB日志文件(ib_logfile0和ib_logfile1)的大小与配置文件(my.cnf)中指定的大小不匹配,这可能导致数据库无法...
当遇到"InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes"这样的错误时,通常意味着InnoDB的日志文件大小与MySQL配置文件中设置的大小不匹配。 InnoDB的日志文件通常以`ib_logfile0`和...
- **错误示例**:`InnoDB: Error: logfile.\ib_logfile0 is of different size 052428800 bytes InnoDB: than specified in the .cnf file 010485760 bytes!` 2. **默认存储引擎不可用**:错误日志中还显示了...
- 日志文件大小不匹配:`InnoDB: Error: logfile .\ib_logfile0 is of different size 052428800 bytes InnoDB: than specified in the .cnf file 010485760 bytes!` - 存储引擎不可用:`1010019:47:42 [ERROR] ...
如果日志文件大小与预期不同,如“Error: log file ./ib_logfile0 is of different size 0 5242880 bytes”,这表明InnoDB日志文件的配置与实际大小不符。这可能源于my.cnf配置文件的更改。解决方法是删除旧的日志...