2

我不知道这个问题是否适合 SO,但如果它不只是关闭它......

问题是,在迁移到另一台专用服务器后,我无法启动我的 MySQL 服务器,日志显示如下:

120625 13:04:10 mysqld_safe mysqld from pid file /var/db/mysql/ropp.pid ended
120625 13:04:29 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
120625 13:04:29 InnoDB: The InnoDB memory heap is disabled
120625 13:04:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120625 13:04:29 InnoDB: Compressed tables use zlib 1.2.3
120625 13:04:29 InnoDB: Initializing buffer pool, size = 128.0M
120625 13:04:29 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!
120625 13:04:29 [ERROR] Plugin 'InnoDB' init function returned error.
120625 13:04:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120625 13:04:29 [ERROR] Unknown/unsupported storage engine: InnoDB
120625 13:04:29 [ERROR] Aborting

120625 13:04:29 [Note] /usr/local/libexec/mysqld: Shutdown complete

120625 13:04:29 mysqld_safe mysqld from pid file /var/db/mysql/ropp.pid ended

问题出在哪里,我该怎么办?我的 MySQL 服务器版本是5.5.

4

1 回答 1

4

问题是新服务器上的 mysql 配置与旧服务器不匹配。该变量innodb_log_file_size设置为,5M但日志的实际大小为 100MB。您需要在 中更改该值my.cnf

如果 MySQL 服务器正在运行,则关闭它(不应该)。编辑my.cnf并更改innodb_log_file_sizeto的值100M

innodb_log_file_size = 100M

这应该可以解决问题。启动服务器。如果它不起作用,则停止服务器,将 ib_logfile0 和 ib_logfile1 移动到 .bak 并再次启动服务器。

于 2012-06-25T14:14:50.453 回答