MySQL Variables and status

Source: Internet
Author: User

MySQL settings variable is in the My.cnf file, after modifying the configuration file will need to restart the MySQL service to take effect. But on-line server is not allowed to restart the random, we can use the command to directly modify the value of the variable to make it effective. You can then modify the values in the configuration file to prevent the old values from restarting.

Show variables like "slow%" #查询慢查询相关的变量

Slow_launch_time indicates that if a thread is set to take longer than this value, the slow_launch_threads counter will increase

mysql> set global long_query_time=4;

#设定慢查询的阀值, SQL that exceeds the sub-set value is logged to the slow query log with a default value of 10s

Mysql> Show variables like ' long% ';

MySQL Variables and status

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.