2012-11-06 41 views
6

昨晚,服务器从MySQL服务器升级到InnoDB Cpanel在MySQL服务器关闭时遇到了很多问题! 因为很多在他们的数据库InnoDB的引擎表上VPS的网站并没有把他们的网站,并说Mysql中的InnoDB错误

error: Unknown table engine 'InnoDB' 

错误

这将使MySQL服务器,但它并没有把InnoDB的! mysql命令

show engines; 

我注意到下面的结果是不是InnoDB的结果

mysql> show engines; 

| Engine | Support | Comment | Transactions | XA | Savepoints | 

| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO | 
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | 
| BLACKHOLE | YES |/dev/null storage engine (anything you write to it disappears) | NO | NO | NO | 
| CSV | YES | CSV storage engine | NO | NO | NO | 
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | 
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | 
| ARCHIVE | YES | Archive storage engine | NO | NO | NO | 

7 rows in set (0.00 sec) 

登录到MySQL服务器提供了一个错误......

121105 18:26:50 mysqld_safe Starting mysqld daemon with databases from/var/lib/mysql 
121105 18:26:50 [Note] Plugin 'FEDERATED' is disabled. 
121105 18:26:50 InnoDB: Initializing buffer pool, size = 8.0M 
121105 18:26:50 InnoDB: Completed initialization of buffer pool 
InnoDB: Error: log file ./ib_logfile0 is of different size 0 268435456 bytes 
InnoDB: than specified in the. Cnf file 0 536870912 bytes! 
121105 18:26:50 [ERROR] Plugin 'InnoDB' init function returned error. 
121105 18:26:50 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
121105 18:26:50 [Note] Event Scheduler: Loaded 0 events 
121105 18:26:50 [Note]/usr/sbin/mysqld: ready for connections. 
Version: '5 .1.65-cll 'socket:'/var/lib/mysql/mysql.sock 'port: 3306 MySQL Community Server (GPL) 

my.cnf中的InnoDB两者的设置为:

innodb_fast_shutdown = 0 
innodb_log_buffer_size = 8M 
innodb_log_file_size = 512M 

谢谢,plz帮我解决了这个问题。

+0

如果你有你的朋友,帮助解决问题,你为什么要问吗? ':P' –

+1

也许这个职位wil帮助你:[link] http://stackoverflow.com/questions/4757589/how-to-enable-innodb-in-mysql [/ link] – GregD

+0

@GregD,我检查出了工作,但有一个问题。 –

回答

5

从我在你的日志中看到的你的InnoDB由于其文件ib_logfile0被打乱了。硬盘驱动器崩溃时,我遇到了同样的问题,让这个文件无法读取 - 读完了我能够形成损坏的驱动器文件的内容后,数据很糟糕。

InnoDB: Error: log file ./ib_logfile0 is of different size 0 268435456 bytes 
InnoDB: than specified in the. Cnf file 0 536870912 bytes! 

它存在 - >你的文件是256 MB大小,但你的配置告诉它应该是512MB大小。修复配置中的错误。

然后 - 备份所有你的数据(带数据的innodb表)。 关机数据库(清理关机 - 所有事务都必须完成 - 为了使文件变大,日志不应包含它们)。 然后备份ib*文件并更改配置。 重新启动数据库。

有关详细信息,请有http://dev.mysql.com/doc/refman/5.5/en/innodb-data-log-reconfiguration.html