Enabling MySQL slow query log on Windows Host

Source: Internet
Author: User
Tags mysql slow query log

Discuz is slow. when MySQL is frequently rushed to MySQL 100%, find the cause. Here, we will first write down the slow query log of MySQL on a Windows host, as shown below:
Run the CMD command line in the bin directory of MySQL. net stop mysql. Find the my. ini file (under the MySQL directory) and add it to the [mysqld] line:
Long_query_time = 2
Log-Slow-queries =/usr/local/MySQL/log/slowquery. Log
Then start MYSQL: Net start MySQL.

MySQL logs:
Error Log:-log-err
Query log:-Log
Slow query log:-log-Slow-queries
Update log:-log-Update
Binary log:-log-bin

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.