…. Auditing user activity in MySQL has traditionally been challenging. Most data can be obtained from the slow or general log, but this involves a…host”:”localhost”,”cmd”:”Connect”,”query“:”Connect”} In conclusion, the plugin API seems to be opening new possibilities of extending MySQL‘s behavior in…
Post: Percona Toolkit for MySQL Webinar Followup Questions
… the slow query log file, so pt-query-digest is often used with the –processlist option. But as discussed during the webinar, you may miss some queries… the MySQL webinar? A: All the scripts are included in the slides. My setup was the following: 1 instance installed by the package manager, with the…
Post: Rotating MySQL slow logs safely
…slow log that illustrates these best practices: /var/mysql/slow_query.log { nocompress create 660 mysql mysql size 1G dateext missingok notifempty sharedscripts postrotate /usr/local/bin/mysql…
Post: MySQL 5.6 Compatible Percona Toolkit 2.2 Released
… of log now (slow, general, binary, and tcpdump), so you shouldn’t have a problem finding queries to run and compare. pt-query-digest… it on its primary objective: analyzing MySQL query logs. So the ability to parse memcached, Postgres, Apache, and other logs was removed. We also removed…
Comment: Rotating MySQL slow logs safely
…the slow logs are disabled in the postrotate stanza. The order of operations is: 1. logrotate renames the log file. MySQL continues to write to the renamed file because it has not yet reopened the file. 2. logrotate runs the postrotate stanza 2a. Slow logging is paused (set global long_query…
Post: A (prototype) lower impact slow query log
… to re-examine how we could provide slow query log type functionality to our users. The slow query log code inside the MySQL server does several things that aren… out I had to extend the MySQL plugin API to be able to reproduce all the information in the slow query log. The code for my prototype can…
Post: Logging MySQL queries from the client instead of the server
The “slow query log” is the single most valuable way to examine query execution on your MySQL server. Queries are logged with timing information, and in the case of Percona… to make the application time the queries and write a query log. I suggest writing out something in a standard logging format such as the slow-query-log format, so…
Post: Slow Query Log analyzes tools
… Slow Query Log – Especially after the changes to log all queries slow query log may be growing too rapidly to follow, so we implemented slow query log filter (based on parse_mysql_slow_log by… passes across same slow query log first to fix worse queries and then come to find more optimization candidates. So “tail -f mysql-slow.log | mysql_slow_log_filter -T…
Post: Get Me Some Query Logs!
… slow_query_log=1 Flushing slow query log Sleeping 5 seconds… done. Restoring slow_query_log_file=mysql-slow.log Restoring long_query_time=60.000000 Restoring slow_query_log=1 Flushing logs during restore Notice that the script also redirects the slow query log to a…

