PDA

View Full Version : InnoDB, innodb_log_file_size


Keeper
8th September 2009, 10:26
To get InnoDB enabled in the first place, I followed instructions here:
http://www.geedew.com/2008/05/21/how-to-fix-innodb-has-been-disabled-for-this-mysql-server/

Now I noticed that if I change innodb_log_file_size value and restart InnoDB, InnoDB engine and tables become unusable.

After googling a bit, I found some obscure comments;

It turns out that the reason InnoDB is disabled is because of the innodb_log_file_size setting not matching the files on disk.
Rumour has it that you can just stop MySQL, delete these log files and start MySQL again. I'm yet to try this as the server in question is in production use. The alternative is to change the innodb_log_file_size setting to match the file.

Source: http://www.davidpashley.com/blog/databases/mysql/innodb-disabled




Changing innodb_log_file_size can yield strange errors, such as: Incorrect information in file: './db010840/notifications.frm'

Source: http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html



It disables Innodb when the "innodb_log_file_size" setting in the my.ini/my.cnf not matching the files on the disk.

Source: http://www.orangehrm.com/wiki/index.php/29)_Enabling_InnoDB_not_working




Don't delete the current log files. Rename them instead. Once you have the log files renamed you can change the log file size in my.cnf and start MySQL. The log files will be created with the new size. Once MySQL has started correctly you can delete the old log files.

Source: http://forums.mysql.com/read.php?22,23678,23775#msg-23775


Seriously? Something this important should be written to all mysql conf files if MySQL can't handle something like this automatically. This is just a recipe for panic attacks and data loss.