To change the number or size of InnoDB
redo log files in MySQL 5.6.7
or earlier, perform the following steps:
If innodb_fast_shutdown is
set to 2, set
innodb_fast_shutdown to 1:
mysql> SET GLOBAL innodb_fast_shutdown = 1;
After ensuring that
innodb_fast_shutdown is not
set to 2, stop the MySQL server and make sure that it shuts
down without errors (to ensure that there is no information
for outstanding transactions in the log).
Copy the old log files into a safe place in case something went wrong during the shutdown and you need them to recover the tablespace.
Delete the old log files from the log file directory.
Edit my.cnf to change the log file
configuration.
Start the MySQL server again. mysqld sees
that no InnoDB log files exist at
startup and creates new ones.
As of MySQL 5.6.8, the
innodb_fast_shutdown setting is
no longer relevant when changing the number or the size of
InnoDB log files. Additionally, you are no
longer required remove old log files, although you may still want
to copy the old log files to a safe place, as a backup. To change
the number or size of InnoDB log files, perform
the following steps:
Stop the MySQL server and make sure that it shuts down without errors.
Edit my.cnf to change the log file
configuration. To change the log file size, configure
innodb_log_file_size. To
increase the number of log files, configure
innodb_log_files_in_group.
Start the MySQL server again.
If InnoDB detects that the
innodb_log_file_size differs from
the redo log file size, it will write a log checkpoint, close and
remove the old log files, create new log files at the requested
size, and open the new log files.