MySQL 5.6修改REDO日誌的大小和個數
一套線上環境的REDO日誌的大小和格式設定的不合理,需要將日誌大小修改成2G,個數改為5個。
-
# 修改引數檔案
-
# vi /etc/my_56.cnf
-
innodb_log_file_size = 2G
-
innodb_log_files_in_group = 5
-
-
# 重啟資料庫
-
-
# 啟動的時候,檢視錯誤日誌,可以看到重新初始化了REDO日誌
-
2018-05-28 09:40:54 25439 [Note] Plugin 'FEDERATED' is disabled.
-
2018-05-28 09:40:54 25439 [Note] InnoDB: Using atomics to ref count buffer pool pages
-
2018-05-28 09:40:54 25439 [Note] InnoDB: The InnoDB memory heap is disabled
-
2018-05-28 09:40:54 25439 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
-
2018-05-28 09:40:54 25439 [Note] InnoDB: Memory barrier is not used
-
2018-05-28 09:40:54 25439 [Note] InnoDB: Compressed tables use zlib 1.2.3
-
2018-05-28 09:40:54 25439 [Note] InnoDB: Using Linux native AIO
-
2018-05-28 09:40:54 25439 [Note] InnoDB: Using CPU crc32 instructions
-
2018-05-28 09:40:54 25439 [Note] InnoDB: Initializing buffer pool, size = 1.0G
-
2018-05-28 09:40:55 25439 [Note] InnoDB: Completed initialization of buffer pool
-
2018-05-28 09:40:55 25439 [Note] InnoDB: Highest supported file format is Barracuda.
-
2018-05-28 09:40:55 25439 [Warning] InnoDB: Resizing redo log from 2*3072 to 5*131072 pages, LSN=19620839567
-
2018-05-28 09:40:55 25439 [Warning] InnoDB: Starting to delete and rewrite log files.
-
2018-05-28 09:40:55 25439 [Note] InnoDB: Setting log file ./ib_logfile101 size to 2048 MB
-
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
-
2018-05-28 09:41:06 25439 [Note] InnoDB: Setting log file ./ib_logfile1 size to 2048 MB
-
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
-
2018-05-28 09:41:16 25439 [Note] InnoDB: Setting log file ./ib_logfile2 size to 2048 MB
-
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
-
2018-05-28 09:41:26 25439 [Note] InnoDB: Setting log file ./ib_logfile3 size to 2048 MB
-
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
-
2018-05-28 09:41:36 25439 [Note] InnoDB: Setting log file ./ib_logfile4 size to 2048 MB
-
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
-
2018-05-28 09:41:46 25439 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
-
2018-05-28 09:41:46 25439 [Warning] InnoDB: New log files created, LSN=19620839567
-
2018-05-28 09:41:46 25439 [Note] InnoDB: 128 rollback segment(s) are active.
-
2018-05-28 09:41:46 25439 [Note] InnoDB: Waiting for purge to start
-
2018-05-28 09:41:46 25439 [Note] InnoDB: 5.6.39 started; log sequence number 19620839567
-
2018-05-28 09:41:46 25439 [Note] Server hostname (bind-address): '*'; port: 3306
-
2018-05-28 09:41:46 25439 [Note] IPv6 is available.
-
-
# 啟動成功後,檢視REDO日誌的大小
-
mysql> show global variables like '%innodb_log_file_size%';
-
+----------------------+------------+
-
| Variable_name | Value |
-
+----------------------+------------+
-
| innodb_log_file_size | 2147483648 |
-
+----------------------+------------+
-
1 row in set (0.01 sec)
-
-
mysql> show global variables like '%innodb_log_files_in_group%';
-
+---------------------------+-------+
-
| Variable_name | Value |
-
+---------------------------+-------+
-
| innodb_log_files_in_group | 5 |
-
+---------------------------+-------+
- 1 row in set (0.01 sec)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2155223/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL之事務和redo日誌MySql
- MySQL 修改InnoDB重做日誌檔案的數量或大小MySql
- MySQL重做日誌(redo log)MySql
- MySQL redo與undo日誌解析MySql
- 【TUNE_ORACLE】Oracle檢查點(四)檢查點對redo日誌的影響和redo日誌大小設定建議Oracle
- MySQL 日誌系統 redo log、binlogMySql
- 必須瞭解的mysql三大日誌-binlog、redo log和undo logMySql
- 【Mysql】三大日誌 redo log、bin log、undo logMySql
- mysql關於redo事務日誌ib_logfile的理解MySql
- mysql日誌:redo log、binlog、undo log 區別與作用MySql
- 資料庫篇:mysql日誌型別之 redo、undo、binlog資料庫MySql型別
- MySQL更新資料時,日誌(redo log、binlog)執行流程MySql
- MySQL如何計算統計redo log大小MySql
- Postgres使用pg_resetwal命令修改wal日誌檔案大小的方法
- Oracle redo日誌內容探索(一)Oracle Redo
- 【REDO】Oracle 日誌挖掘,分析歸檔日誌線上日誌主要步驟Oracle
- 調整innodb redo log files數目和大小的具體方法和步驟
- 檢視Oracle的redo日誌切換頻率Oracle
- oracle丟失的是所有的redo日誌組Oracle
- Oracle redo日誌內容探索之二Oracle Redo
- MySQL binlog和redo的組提交MySql
- MySQL中的redo log和checkpointMySql
- MySQL日誌引數配置簡介MySql
- 檢視oracle的redo日誌組切換頻率Oracle
- 7 Redo Transport Services 日誌傳輸服務
- MySQL 的日誌:binlogMySql
- 限制 Apache日誌檔案大小的方法Apache
- Mysql日誌MySql
- MySQL中的redo log和undo logMySql
- 【MySQL日誌】MySQL日誌檔案初級管理MySql
- Laravel 5.6+ 使用 MongoDB 儲存框架日誌LaravelMongoDB框架
- 關於MySQL 通用查詢日誌和慢查詢日誌分析MySql
- MySQL的日誌總結MySql
- mysql 鎖的慢日誌MySql
- MySQL 五 日誌MySql
- Mysql 日誌管理MySql
- MySQL(3)-日誌MySql
- MySQL日誌管理,備份和恢復MySql