MySQL中的InnoDB错误

6

昨晚服务器升级了MySQL服务器,并使用了InnoDB。当MySQL服务器关闭时,Cpanel遇到了很多问题!因为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)

在我的.cnf文件中,InnoDB的设置如下:

 innodb_fast_shutdown = 0
 innodb_log_buffer_size = 8M
 innodb_log_file_size = 512M

感谢您,帮我解决问题。

如果你有朋友可以帮忙解决问题,为什么要在这里问呢?:P - Praveen Kumar Purushothaman
1
也许这篇文章可以帮到你:[链接]https://dev59.com/32445IYBdhLWcg3wpb4P[/链接] - GregD
@GregD,我看了一下这个工作,但是有一个问题。 - Amir Gholami
1个回答

6

根据您日志的情况显示,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*文件并更改配置。 重新启动DB。

如需更详细信息,请访问http://dev.mysql.com/doc/refman/5.5/en/innodb-data-log-reconfiguration.html


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接