Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have modified the my.cnf for a MySQL 5 installation and now I receive the following error in syslog:

InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 268435456 bytes!
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

I have removed the lines from my.cnf one by one and found the error prone lines are:

innodb_log_file_size = 256M
innodb_log_files_in_group = 3

I don't see how specifying 256M limit is stopping a 5M file working.

Does anyone know what causes this problem?

share|improve this question
up vote 0 down vote accepted

You need to do the following:

Add these lines to /etc/my.cnf

innodb_log_file_size = 256M
innodb_log_files_in_group = 2

then, do this:

service mysql stop
service mysql start --innodb-fast-shutdown=0
service mysql stop
rm -f /var/log/mysql/ib_logfile
service mysql start
share|improve this answer

You're getting the error because you need to follow the proper documented method of Resizing a log file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.