In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to adjust the log group in MYSQL, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
1. View the shutdown method:
Mysql > show variables like'% fast%'
+-+ +
| | Variable_name | Value |
+-+ +
| | innodb_fast_shutdown | 1 | |
+-+ +
1 row in set (0.00 sec)
This parameter is explained as follows: the default value is 1, and the setting of 0 is clean. The shutdown corresponds to the shutdown immeidate in ORACLE.
The InnoDB shutdown mode. If the value is 0, InnoDB does a slow shutdown, a full purge and a change buffer merge before shutting down. If the value is 1 (the default), InnoDB skips these operations at shutdown, a process known as a fast shutdown. If the value is 2, InnoDB flushes its logs and shuts down cold, as if MySQL had crashed; no committed transactions are lost, but the crash recovery operation makes the next startup take longer. .
2. Adjust the parameter innodb_fast_shutdown to 0
Set global innodb_fast_shutdown=0
3. Close MYSQL
Mysqladmin-uroot shutdown-S / home/mysql-5.6/mysql-3306/mysql.sock
4. Resize REDO. Log files are named at the beginning of ib_logfile by default.
1. Find the directory where the REDO file is located (several files are processed, move to another directory).
Mv ib_logfilexx.. / ib_logfilexx
2. Add parameters: number of log groups and log size to parameter file
Add the following parameters under the parameter file [mysqld]
Innodb_log_file_size = 512m-size of each log group 512m
Innodb_log_files_in_group = 3-A total of 3 log groups
5. Open mysql
. / mysqld_safe-- defaults-file=/home/mysql-5.6/mysql-3307/my.cnf &
6. View the size and number of modified log groups
Mysql > show variables like'% log_file%'
+-+
| | Variable_name | Value |
+-+
| | general_log_file | / home/mysql-5.6/mysql-3306/data/test1.log |
| | innodb_log_file_size | 536870912 | |
| | innodb_log_files_in_group | 3 | |
| | slow_query_log_file | / home/mysql-5.6/mysql-3306/data/test1-slow.log |
+-+
4 rows in set (0.00 sec)
The above is how to adjust the log group in MYSQL. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.