Difference between revisions of "Enable MySQL Query Slow Log"

From Knowledge Center
Jump to: navigation, search
(Created page with "To enable slow query logging, edit <code>/etc/my.cnf</code> and append this config: <pre> slow_query_log = 1 long_query_time = 1 slow_query_log_file = /var/log/mysql/slow-qu...")
 
 
Line 13: Line 13:
 
* https://ma.ttias.be/mysql-slow-query-log-without-restart/
 
* https://ma.ttias.be/mysql-slow-query-log-without-restart/
 
* https://www.binarylane.com.au/support/solutions/articles/11000012649-how-to-enable-the-mysql-slow-query-log
 
* https://www.binarylane.com.au/support/solutions/articles/11000012649-how-to-enable-the-mysql-slow-query-log
 +
* https://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/3/
  
 
[[Category:MySQL]]
 
[[Category:MySQL]]

Latest revision as of 18:48, 24 November 2018

To enable slow query logging, edit /etc/my.cnf

and append this config:

slow_query_log = 1
long_query_time = 1
slow_query_log_file = /var/log/mysql/slow-query.log

Great Resources: