Advertisement
Tritonio

Enable slow query monitoring in mysql

May 3rd, 2020
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. You can set it temporarily, by running the following commands:
  2.  
  3. set global slow_query_log = 1;
  4. but your changes will be undone when mysql is restarted.
  5.  
  6. You can set it permanently, by adding the following to your my.cnf file:
  7.  
  8. slow-query-log=1
  9.  
  10. Then check the queries with:
  11.  
  12. mysqldumpslow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement