I'm new to MySQL. MySQL version is 5.0.95. I have enabled the slow query log and edited in the cnf file the location of slow query log but I couldn't see slow query log files in the server location after I edited in cnf file, so I did manually create slow-query.log in the server location. Correct me if I'm wrong and now I want to view the slow-query.log file using 'mysqldumpslow /var/log/mysql/mysql-slow.log' but I couldn't view its contents. Is there any other specific query to view the slow-query log files?
long_query_time. The default is a nearly-useless 10 seconds.
The actual location of the slowlog is a bit tricky. Search your entire disk if it does not show up in any obvious place. Don't create the file yourself, it "mysql" may not have permissions to write to it, thereby confusing you further.
SELECT SLEEP(11); That should show up even with a cutoff of 10.
mysqlsdumpslow is one way to dump it. Better is
Do you realize how antique 5.0 is? Some day, you will upgrade. But it will be painful to go through 5.1, 5.5, 5.6, 5.7, to get to the current 8.0.