CentOS 下的 Mysql 启动出现 log file 错误

错误详细内容如下:120220 10:16:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 120220 10:16:48 [Warning] option 'max_allowed_packet': unsigned value 3221225472 adjusted to 1073741824 120220 10:16:48 [Note] Plugin 'FEDERATED' is disabled. 120220 10:16:48 InnoDB: The InnoDB memory heap is disabled 120220 10:16:48 InnoDB: Mutexes and rw_locks use InnoDB's own implementation 120220 10:16:48 InnoDB: Compressed tables use zlib 1.2.3 120220 10:16:48 InnoDB: Using Linux native AIO 120220 10:16:48 InnoDB: Initializing buffer pool, size = 128.0M 120220 10:16:48 InnoDB: Completed initialization of buffer pool InnoDB: Error: log file ./ib_logfile0 is of different size 0 104857600 bytes InnoDB: than specified in the .cnf file 0 5242880 bytes! 120220 10:16:48 [ERROR] Plugin 'InnoDB' init function returned error. 120220 10:16:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 120220 10:16:48 [ERROR] Unknown/unsupported storage engine: InnoDB 120220 10:16:48 [ERROR] Aborting 可以修改mysql 的配置文件。

如果innodb_log_file_size = 100M这句话被注释掉了,请去掉前面的注释符后重启 mysql。

一般来说能修复 mysql 启动的日志大小错误。