The Slow Query Log. Slow Query Log Overview. Thus it should be protected.
As a result our log files are growing at an insane pace. This allows you to find inefficient SQL queries that can be optimized to improve database performance. This is due to the additional routines needed to analyze each query as well as the IO needed to write the necessary queries to the log file.
After that then do the following commands to create the file with the right ownership and file permissions.
Locate the configuration section mysqld. Use the command mysqldumpslow to analyze it and print summary of the slow query logfile. If your server is above 516 you can set the slow query log in the runtime itself. The full list of mysqldumpslow options is available here.