Mysql problems-solutions for a large number of binlog dump records in slow log

Source: Internet
Author: User

There is a database online, and there are a lot of records similar to the following in slow log:

Copy codeThe Code is as follows:
# Time: 130823 13:56:08
# User @ Host: repl [repl] @ slave [10. x]
# Query_time: 9.000833 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 1
SET timestamp = 1377237368;
# Administrator command: Binlog Dump;


Every time binlog dump is completed, it will be recorded, and it looks very uncomfortable (I have obsessive-compulsive disorder, O (strong _ strong) O Haha ~), You have to figure it out.
After investigation, it was finally confirmed that this phenomenon exists in a specific version. Currently, it is found that the official version 5.1.49 exists. It is estimated that this phenomenon will occur throughout the official version 5.1.x.

Solution:

Modify the my. cnf configuration file and add or modify the following options:

Copy codeThe Code is as follows:
Log-slow-admin-statements = 0


If this option cannot be modified online in MySQL 5.1, restart mysqld.
The manual explains this option as follows:

Copy codeThe Code is as follows:
Include slow administrative statements in the statements written to the slow query log. Administrative statements include alter table, analyze table, check table, create index, drop index, optimize table, and repair table.


When the manual is unreliable, it is still a matter of practice.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.