In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how MySQL 5.6 modifies the size and number of REDO logs. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The size and format of REDO logs in an online environment are unreasonable, so you need to change the log size to 2G and the number to 5.
# modify parameter file
# vi / etc/my_56.cnf
Innodb_log_file_size = 2G
Innodb_log_files_in_group = 5
# restart the database
# when starting up, check the error log and you can see that the REDO log has been reinitialized
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 logfile. / 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 logfile. / 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 logfile. / 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 logfile. / 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 logfile. / 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 logfile. / 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: 128rollback 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.
# after starting successfully, check the size of the REDO log
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)
Thank you for reading! This is the end of this article on "how to modify the size and number of REDO logs in MySQL 5.6". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.