Home > Database > Mysql Tutorial > body text

How to enable mysql slow query log configuration

WJ
Release: 2020-05-30 13:09:18
forward
2271 people have browsed it

How to enable mysql slow query log configuration

How to enable mysql slow query log configuration

By default, the value of slow_query_log is OFF, indicating slow query log It is disabled and can be turned on by setting the value of slow_query_log

Open mysql and check whether it is turned on first. As shown below, the status is turned off

show variables like '%slow_query_log%';
Copy after login
Copy after login

How to enable mysql slow query log configuration

##Open

set global slow_query_log=1;
Copy after login

After querying once, the on status in the figure below indicates that it is open. show_query_log_file is the file location where slow statements are recorded.

show variables like '%slow_query_log%';
Copy after login
Copy after login

How to enable mysql slow query log configuration

The above is all about how to enable mysql slow query log configuration.

Related references:

php中文网

The above is the detailed content of How to enable mysql slow query log configuration. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:51dev.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!