Changing the number or size of InnoDB redo log files

The ib_logfile0 file and ib_logfile1 are the default InnoDB redo log files created inside the data directory, with 48 MB each. If you wish to change the size of the redo log files, you can simply change it in the configuration file and restart MySQL. In previous versions, you had to do a slow shutdown of MySQL server, remove the redo log files, change the config file, and then start MySQL server.

As of MySQL 8, InnoDB detects that the innodb_log_file_size differs from the redo log file size. It writes a log checkpoint, closes and removes the old log files, creates new log files at the requested size, and opens the new log files.

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.