开发者

Get number of all queries on my mysql database in last hour?

I need to get all queries that are made in last hour on开发者_如何学编程 my wordpress database.


You can enabled general log on mysql

details :

  1. http://dev.mysql.com/doc/refman/5.1/en/query-log.html
  2. http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_general_log

After that, you can parse/digest the log or simply do a grep (linux).

If you not familiar with grep, you can look for log analyzer for mysql
(I sure there is, but doing a grep is much easier)


You can check the update queries (only queries which did a modification to the data) with Binary log or update log (You will need to enable them)

Slow queries are again logged to the slow query logs.

I am not aware if mysql logs read only queries.

Hope this is of some help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜