MySQL5.6如何修改REDO日志的大小和個(gè)數(shù)-創(chuàng)新互聯(lián)

這篇文章給大家分享的是有關(guān)MySQL 5.6如何修改REDO日志的大小和個(gè)數(shù)的內(nèi)容。小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過來看看吧。

創(chuàng)新互聯(lián)堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的雞東網(wǎng)站設(shè)計(jì)、移動媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!

一套線上環(huán)境的REDO日志的大小和格式設(shè)置的不合理,需要將日志大小修改成2G,個(gè)數(shù)改為5個(gè)。

  1. # 修改參數(shù)文件

  2. # vi /etc/my_56.cnf

  3. innodb_log_file_size = 2G

  4. innodb_log_files_in_group = 5

  5. # 重啟數(shù)據(jù)庫

  6. # 啟動的時(shí)候,查看錯誤日志,可以看到重新初始化了REDO日志

  7. 2018-05-28 09:40:54 25439 [Note] Plugin 'FEDERATED' is disabled.

  8. 2018-05-28 09:40:54 25439 [Note] InnoDB: Using atomics to ref count buffer pool pages

  9. 2018-05-28 09:40:54 25439 [Note] InnoDB: The InnoDB memory heap is disabled

  10. 2018-05-28 09:40:54 25439 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

  11. 2018-05-28 09:40:54 25439 [Note] InnoDB: Memory barrier is not used

  12. 2018-05-28 09:40:54 25439 [Note] InnoDB: Compressed tables use zlib 1.2.3

  13. 2018-05-28 09:40:54 25439 [Note] InnoDB: Using Linux native AIO

  14. 2018-05-28 09:40:54 25439 [Note] InnoDB: Using CPU crc32 instructions

  15. 2018-05-28 09:40:54 25439 [Note] InnoDB: Initializing buffer pool, size = 1.0G

  16. 2018-05-28 09:40:55 25439 [Note] InnoDB: Completed initialization of buffer pool

  17. 2018-05-28 09:40:55 25439 [Note] InnoDB: Highest supported file format is Barracuda.

  18. 2018-05-28 09:40:55 25439 [Warning] InnoDB: Resizing redo log from 2*3072 to 5*131072 pages, LSN=19620839567

  19. 2018-05-28 09:40:55 25439 [Warning] InnoDB: Starting to delete and rewrite log files.

  20. 2018-05-28 09:40:55 25439 [Note] InnoDB: Setting log file ./ib_logfile101 size to 2048 MB

  21. InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000

  22. 2018-05-28 09:41:06 25439 [Note] InnoDB: Setting log file ./ib_logfile1 size to 2048 MB

  23. InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000

  24. 2018-05-28 09:41:16 25439 [Note] InnoDB: Setting log file ./ib_logfile2 size to 2048 MB

  25. InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000

  26. 2018-05-28 09:41:26 25439 [Note] InnoDB: Setting log file ./ib_logfile3 size to 2048 MB

  27. InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000

  28. 2018-05-28 09:41:36 25439 [Note] InnoDB: Setting log file ./ib_logfile4 size to 2048 MB

  29. InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000

  30. 2018-05-28 09:41:46 25439 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

  31. 2018-05-28 09:41:46 25439 [Warning] InnoDB: New log files created, LSN=19620839567

  32. 2018-05-28 09:41:46 25439 [Note] InnoDB: 128 rollback segment(s) are active.

  33. 2018-05-28 09:41:46 25439 [Note] InnoDB: Waiting for purge to start

  34. 2018-05-28 09:41:46 25439 [Note] InnoDB: 5.6.39 started; log sequence number 19620839567

  35. 2018-05-28 09:41:46 25439 [Note] Server hostname (bind-address): '*'; port: 3306

  36. 2018-05-28 09:41:46 25439 [Note] IPv6 is available.

  37. # 啟動成功后,查看REDO日志的大小

  38. mysql> show global variables like '%innodb_log_file_size%';

  39. +----------------------+------------+

  40. | Variable_name | Value |

  41. +----------------------+------------+

  42. | innodb_log_file_size | 2147483648 |

  43. +----------------------+------------+

  44. 1 row in set (0.01 sec)

  45. mysql> show global variables like '%innodb_log_files_in_group%';

  46. +---------------------------+-------+

  47. | Variable_name | Value |

  48. +---------------------------+-------+

  49. | innodb_log_files_in_group | 5 |

  50. +---------------------------+-------+

  51. 1 row in set (0.01 sec)

感謝各位的閱讀!關(guān)于“MySQL 5.6如何修改REDO日志的大小和個(gè)數(shù)”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學(xué)到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

本文標(biāo)題:MySQL5.6如何修改REDO日志的大小和個(gè)數(shù)-創(chuàng)新互聯(lián)
標(biāo)題網(wǎng)址:http://muchs.cn/article28/ddppcp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司網(wǎng)站設(shè)計(jì)、品牌網(wǎng)站設(shè)計(jì)、網(wǎng)站維護(hù)、企業(yè)建站、品牌網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站制作