I have modified the my.cnf for a MySQL 7 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

Does anyone know what causes this problem? I don't see how specifying 256M limit is stopping a 5M file working.

link|improve this question
feedback

2 Answers

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
innodb_bufffer_pool_size=1G

then, do this:

  1. service mysql stop
  2. rm /var/log/mysql/ib_logfile*
  3. service mysql start
link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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