To change the number or the size of your InnoDB redo log files, perform the following steps:
要更改InnoDB重做日志文件的数量或大小,请执行以下步骤:
- Stop the MySQL server and make sure that it shuts down without errors.
- 停止MySQL服务器并确保它关闭时没有错误。
- 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.
- 编辑my.cnf以更改日志文件配置。 要更改日志文件大小,请配置innodb_log_file_size。 要增加日志文件的数量,请配置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 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.
如果InnoDB检测到innodb_log_file_size与重做日志文件大小不同,它会写入日志检查点,关闭并删除旧的日志文件,以请求的大小创建新的日志文件并打开新的日志文件。
PREV: 14.7.1 Resizing the InnoDB System Tablespace. https://blog.51cto.com/itzhoujun/2359832
NEXT: 14.7.3 Using Raw Disk Partitions for the System Tablespace. https://blog.51cto.com/itzhoujun/2359835