Have you forgotten mysql history or mysql history?
To view mysql statements, we usually use the show processlist command. However, this command makes sense for statements with a long query time, the statement that can be executed at once cannot be used quickly.
So we can only start from the mysql history. To achieve this goal, we need to modify the/etc/my. cnf file.
In my. insert log =/etc/tmp/mysql under [mysqld] (which may be invalid elsewhere) in cnf. log (the log address can be defined by yourself, but it should not be in the home, otherwise it may not be displayed, mainly with write permission ). restart the database and run the service mysqld restart command. this log records all the execution statements, so when the database is busy, this log may become very large and should not be viewed.
You can use the tail-f/etc/tmp/mysql. log command to continuously observe and execute the statement. You can also download the file and take a look at it.
========================================================== =
In addition, there is a slow query history, which is also in the my. cnf file. The configuration statement is
log-slow-queries=/var/lib/mysql/slowquery.log long_query_time=5 log-queries-not-using-indexes
Here, log-slow-queries is the address of the slow query history, and long_query_time is limited to more than X seconds before it can be added to the history, log-queries-not-using-indexes limits query statements that do not use indexes.
This log can be enabled for a long time because there are not many record statements.
History of mysql
You can view the event log!
Are there any forgotten dynasties in history?
At the same time in the Republic of China, there was a pseudo-manzhou regime supported by Japan in the Northeast, that is, the puppet manipan regime, which is recorded in history. However, when the Republic of China exists, the manzhou regime is rarely mentioned, I don't know if this kind of intentional ignoring is not forgotten. I hope my answers will help you!