How to resize Innodb log files?

Just in case you don’t know resizing Innodb log file is not just simple as changing the value of innodb_log_file_size in the MySQL configuration file. But its even more simpler. Follow the following steps and you will be done with the resizing:

Step 1

Stop the MySQL server and make sure it shuts down without any errors. You can have a look at the error log to see if there are no errors.

Step 2

Once the server has stopped, edit the configuration file and change the value of innodb_log_file_size to your desired value.

Step 3

Move the log file sizes ib_log* to some place out of the the directory where the log files reside.

Step 4

Now restart the server.

And you have successfully changed the log file size. Its not that difficult is it?

Ovais is a storage architect with keen focus on reliability, efficiency and performance of OLTP databases, more specifically MySQL. He currently works at Uber on ensuring storage reliability and scalability. Previously, he helped different web properties scale their MySQL infrastructure. He also worked at Percona as a Senior MySQL consultant and at a few other startups in various capacities.

  • Pingback: Tweets that mention How to resize Innodb log files? | ovais.tariq -- Topsy.com()

  • Pingback: Partition Assistant Assist you Increase the size of System Partition | My Fast Running PC()

  • yuanbin

    If the variable innodb_fast_shutdown=2,you will lost some datas.

  • A value of 2 is not the default value of innodb_fast_shutdown. But default its set to 1 which is a safe value. While fast shutdown will be disabled when set to 0. You wouldn’t really want to disable fast shutdown except for cases when you are doing a major release upgrade. I have not seen so far a use case for a value of 2

  • A value of 2 is not the default value of innodb_fast_shutdown. But default its set to 1 which is a safe value. While fast shutdown will be disabled when set to 0. You wouldn’t really want to disable fast shutdown except for cases when you are doing a major release upgrade. I have not seen so far a use case for a value of 2