launched mytop

mytop --prompt -d db 

Requests are not displayed. I think because they are already fulfilled. How can I view all database requests

enter image description here

What is the problem?

    1 answer 1

    mytop works like a classic top - shows a slice of the current state. If your queries have already been processed and the databases are idle, then you will not see any queries, as a rule, they work out very quickly. If you want to see the history of your requests, you need a log with your requests.

    By default, logging in MySQL is disabled, as this is a rather expensive operation. However, you can enable logging of requests, for this, in the configuration file my.cnf, in the [myqld] section you should

     general_log=1 general_log_file=/path/to/log 

    Instead of / path / to / log, substitute the path to the log file. Logging is enabled after server reboot. To monitor the log in real time, you can use the tail command, passing it the -f parameter and, if necessary, the number of output last lines

     tail -200f /path/to/log