Mysql中的InnoDB错误

Mysql中的InnoDB错误,mysql,innodb,Mysql,Innodb,昨天晚上,服务器从一个使用InnoDB Cpanel的MySQL服务器升级而来,当MySQL服务器关闭时,会出现很多问题! 因为很多vps上的站点在他们的数据库到InnoDB引擎表中并没有建立他们的站点并说 error: Unknown table engine 'InnoDB' 错误 它将启用mysql服务器,但它没有放置InnoDB! mysql命令 show engines; 我注意到以下结果不是InnoDB结果 mysql> show engines; | Engine

昨天晚上,服务器从一个使用InnoDB Cpanel的MySQL服务器升级而来,当MySQL服务器关闭时,会出现很多问题! 因为很多vps上的站点在他们的数据库到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

谢谢,请帮我解决这个问题。

从我在您的日志中看到,您的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!
就是这样->您的文件大小是256MB,但您的配置告诉它应该是512mb大小。修复配置中的错误

然后-备份您的所有数据(带有数据的innodb表)。 关闭数据库(干净关闭-必须完成所有事务-日志不应包含这些事务以使文件变大)。 然后备份
ib*
文件并更改配置。 重新启动数据库


有关详细信息,请访问此处

如果您有朋友帮助解决问题,为什么要在此处询问<代码>:P也许这篇文章会帮助你:[link]@GregD,我检查了工作,但有一个问题。