Detailed analysis of Mysql Slowlog configuration method (text) _mysql

Source: Internet
Author: User

MySQL log system online for some time, the front end in the slowly cut the site to write, proactive DIY set of MySQL monitoring tools.

Divided into slave status, Sync,objec infot,userprivileges,job status, Slowlog.

This time, Slow_log.

MySQL 1.5 starts to support set global globally to change variable settings. Without restarting the service.

can use

Show variables to view variable settings

Open log_output Table Option 5.1 above version support table and file 2 options are used simultaneously, separate such as: Set global log_output= ' Table,file ';

Open Log_slow_query

Set global log_slow_query = on;

With show variables like ' long% ' view long_query_time value defaults to 10 seconds

In this way MySQL will automatically slowlog more than 10 seconds of query statements to the MySQL Library slow_log table.

Work with SSIS and proc to monitor multiple servers daily. Also applies to large-scale MySQL, next write the monitoring point and face problem.

SSIS Flowchart:

Mail Effect Chart: This is the test with Slowlog long_query_time time set to 0

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.