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