Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to open the slow query log of mysql

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

By default, the value of slow_query_log is OFF, which means that slow log is disabled. You can enable it by setting the value of slow_query_log.

Open mysql and first check whether it is enabled. For example, the status below is disabled.

Show variables like'% slow_query_log%'

open

Set global slow_query_log=1

After a query, as shown in the figure below, the status of on indicates that it is open, and show_query_log_file is the location of the file where slow statements are recorded.

Show variables like'% slow_query_log%'

The above are the details of how to open the mysql slow query log configuration, please pay attention to other related articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report