我不知道这个问题是否适合这个问题,但是如果它不仅仅关闭它......
问题是,在迁移到另一台专用服务器后,我无法启动MySQL服务器,logg会说以下内容:
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
。
答案 0 :(得分:4)
问题是新服务器上的mysql配置与旧服务器上的配置不匹配。变量innodb_log_file_size
设置为5M
,但实际日志大小为100MB。您需要在my.cnf
中更改该值。
关闭MySQL服务器(如果它正在运行)(不应该)。修改my.cnf
并将innodb_log_file_size
的值更改为100M
innodb_log_file_size = 100M
这应该可以解决问题。启动服务器。如果它不起作用,则停止服务器,将ib_logfile0和ib_logfile1移动到.bak并再次启动服务器。