這篇文章給大家分享的是有關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)
感謝各位的閱讀!關于“MySQL 5.6如何修改REDO日志的大小和個數”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
本文標題:MySQL5.6如何修改REDO日志的大小和個數-創新互聯
標題網址:http://vcdvsql.cn/article28/ddppcp.html
成都網站建設公司_創新互聯,為您提供建站公司、網站設計、品牌網站設計、網站維護、企業建站、品牌網站建設
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯