Home >Database >Mysql Tutorial >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%';##Open
set global slow_query_log=1;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%';
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!