Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 0 down vote accepted

You need to do the following:

Add these lines to /etc/my.cnf

[mysqld]
innodb_log_file_size = 256M
innodb_log_files_in_group = 2
innodb_bufffer_pool_size=1G

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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.