【问题标题】:InnoDB Error in MysqlMysql中的InnoDB错误
【发布时间】:2012-11-06 09:13:28
【问题描述】:

昨晚服务器从带有 InnoDB 的 MySQL 服务器升级,当 MySQL 服务器关闭时,Cpanel 出现很多问题! 因为很多网站上的vps在他们的数据库中对InnoDB Engine表没有放他们的网站说

error: Unknown table engine 'InnoDB' 

错误

它将启用 mysql 服务器,但它没有放入 InnoDB! mysql命令

show engines; 

我注意到以下结果不是 InnoDB Result

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

谢谢,请帮我解决问题。

【问题讨论】:

  • 如果你有你的朋友帮忙解决问题,你为什么在这里问? :P
  • 也许这篇文章会对你有所帮助:[link]stackoverflow.com/questions/4757589/…
  • @GregD ,我检查了工作,但是有一个问题。

标签: mysql innodb


【解决方案1】:

根据我在您的日志中看到的情况,您的 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

【讨论】:

    猜你喜欢
    • 2017-11-27
    • 1970-01-01
    • 2017-11-17
    • 2010-09-21
    • 2015-04-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多