InnoDB Error in Mysql

Last night, the server was upgraded from the MySQL server using InnoDB Cpanel, and the problem is that the MySQL server will shut down! Since many vps sites in their database in InnoDB Engine Table do not host their site and say

error: Unknown table engine 'InnoDB' 

Error

It will turn on the mysql server, but it did not install InnoDB! Mysql command

 show engines; 

I noticed the following result, which is not the result of 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) 

Logging into mysql server gives an error ...

 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) 

in my.cnf innodb settings for both:

  innodb_fast_shutdown = 0 innodb_log_buffer_size = 8M innodb_log_file_size = 512M 

Thanks, plz help me solve the problem.

+6
source share
1 answer

From what I see in your logs, your InnoDB is broken due to its ib_logfile0 file, is corrupted. I had the same problem when the hard disk crashed, leaving this file unreadable - after reading that I could form a broken disk file, it was fine, but the data inside was corrupted.

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

There it is → You have a 256 MB file, but your configuration says that its size should be 512 MB. Correct the configuration error.

Then back up all your data (innodb data tables). Database shutdown (clean shutdown - all transactions must be completed - the log should not contain them to make the file larger). Then back up the ib* file and change the configuration. Restart DB.

For more information, go there http://dev.mysql.com/doc/refman/5.5/en/innodb-data-log-reconfiguration.html

+5
source

All Articles