June 19, 2013

Post: Experiences with the McAfee MySQL Audit Plugin

… been challenging. Most data can be obtained from the slow or general log, but this involves a lot of data you don…-sys-maint”,”host”:”localhost”,”cmd”:”Connect”,”query“:”Connect”} {“msg-type”:”activity”,”date”:”1369155747373″,”thread-id”:”6439″,”query-id”:”219309″,”user”:”debian-sys…-sys-maint”,”host”:”localhost”,”cmd”:”Quit”,”query“:”Quit”} {“msg-type”:”activity”,”date”:”1369155747383″,”thread-id”:”6440″,”query-id”:”0″,”user”:”debian-sys…

Post: Rotating MySQL slow logs safely

log rotation. Putting it all together Here is a logrotate configuration file for a 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 -e ‘select @@global.long_query

Post: Is your MySQL buffer pool warm? Make it sweat!

…:3307/slow | percona-playback –mysql-host 127.0.0.1 –mysql-username playback –mysql-password PaSSwOrd –mysql-schema schema_name –query-log-stdin… is necessary when running a large stream of queries. Benchmarks We benchmarked with slow query logs captured from our production systems. We restored a…

Comment: Rotating MySQL slow logs safely

… issue. You can set the “slow_query_log_use_global_control” in 5.5 or “use_global_log_slow_control” in 5.1 in 1 and the server will use the global variable long_query_time instead the…#use_global_log_slow_control PS 5.5 http://www.percona.com/doc/percona-server/5.5/diagnostics/slow_extended_55.html#slow_query_log_use…

Post: Percona Toolkit for MySQL Webinar Followup Questions

… you run pt-query-digest on an output of the slow log on a Windows machine? A: Yes, pt-query-digest should work on… won’t be able to have access to 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. Q: Can we get copies of the scripts used in…

Comment: Rotating MySQL slow logs safely

Hi, Martin, Andrew, you are right on these. You can also use SET GLOBAL slow_query_log = on|off to turn slow log on and off, like Bill does in his tool here. http://www.mysqlperformanceblog.com/2012/11/22/get-me-some-query-logs/

Comment: MySQL Slow query log in the table

Hi Peter, how to implement your slow query logs patch on my server . i am using Mysql Database. Please guide me step by step. It would be thanks.

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… pt-query-digest 2.2 has fewer options now. Basically, we re-focused 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

…astrostl, the slow logs are disabled in the postrotate stanza. The order of operations is: 1. logrotate renames the log file. MySQL continues… stanza 2a. Slow logging is paused (set global long_query_time=2000;) 2b. There is a small wait for buffered logs to be flushed (select sleep(2);) 2c. File handles are reopened (FLUSH LOGS ;) 2d. Slow logging resumed (set global long_query_time…

Comment: Is your MySQL buffer pool warm? Make it sweat!

…Joshua, writing every query to disk can be very expensive. At Groupon, we write slow logs to a different disk array on our… may be in your situation. We are also using the slow log rate limiting feature in Percona Server — http://www.percona.com/doc/percona-server/5.5/diagnostics/slow_extended_55.html. Rotating the large slow logs requires some special consideration. We will cover…