Our application is using a very busy MySQL database with lots of reads, sometimes I don't want to look at the MySQL log files, I just want the output from mytop for the last 5 minutes. How do I write the output from mytop to a file?
Given that "mytop -u root --prompt > database.load" does not work?
I was using --prompt instead of -p with the -b flag, which kept on throwing an exception. So the solution would have been to do
mytop -u root -p password > database.load