How to increase an InnoDB log file size

(MySQL 5.0)
Had a question from a student:

He is trying to increase the innodb log file size by altering his .ini file.
After he makes the changes to the .ini file, he attempts to restart the server but fails.

Error messages indicate:
-ib_logfile0 has a different size
-can’t initialize database

The solution was posted by Jay Pipes in the MySQL forum (,32004,32014#msg-32014). Essentially MySQL tries to look for the log file that had the original size, doesn’t find it, aborts the restart.

Solution is to rename the log files. MySQL will recreate the appropriate log files with the appropriate sizes.

#assuming you have a Linux system and you installed MySQL using an RPM#otherwise your MySQL install might be in /usr/local#if you can't figure out where your install folder it, "find" is your friend $/etc/init.d/mysql stop$mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak$mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak$/etc/init.d/mysql start$

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s