June 20, 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…, and isn’t flexible at all. The specific problem of logging failed connection attempts has been discussed on a previous post…, which seems to be on par with having the general log enabled. The flexibility comes from the three variables that can…

Post: Migrating between MySQL schemas with Percona Xtrabackup

… live server.  Mysqldump works well for this, but can quite slow on larger schemas. One of the downsides to mysqldump is… by copying the dirty tablespace files while streaming the redo-logs to ensure that all transactions are also captured.  The –apply… variable) Prepare the backup using the –export flag:  innobackupex –apply-log –export /tmp/snapshot/2013-06-03_11-30 For each…

Post: Rotating MySQL slow logs safely

…. Disable MySQL slow logs during rotation Flushing logs takes time. Meanwhile, queries are still being executed. To prevent MySQL from filling the slow log buffer, we disable the MySQL slow logs temporarily during log rotation. Putting it all together Here is a logrotate configuration file for a slow log

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…/diagnostics/slow_extended.html#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: Is your MySQL buffer pool warm? Make it sweat!

… to 0 in order to log every query. (See part two for handling massive slow log volume.) The slow logs are served, via HTTP, by mysql_slowlogd. This daemon is similar to running `tail -f slow.log`, except… follow the log stream across log rotation events. On the standby server, the logs are replayed with Percona Playback by streaming the slow log from…

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… reopened the file. 2. logrotate runs the postrotate stanza 2a. Slow logging is paused (set global long_query_time=2000;) 2b. There… small wait for buffered logs to be flushed (select sleep(2);) 2c. File handles are reopened (FLUSH LOGS ;) 2d. Slow logging resumed (set global…

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

… to disk can be very expensive. At Groupon, we write slow logs to a different disk array on our large databases. So… 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…

Comment: Rotating MySQL slow logs safely

“To prevent MySQL from filling the slow log buffer, we disable the MySQL slow logs temporarily during log rotation.” Wouldn’t that be in the prerotate section? I don’t see one in the stanza provided.

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/

Post: Percona XtraBackup 2.0.7 for MySQL available for download

… prevent XtraBackup failures that are caused by the log records in the transactional log being overwritten before they are copied by the…. Bug fixed #1116177. If there are thousands of tables and slow IO then XtraBackup can spend a lot of time opening…. Percona XtraBackup didn’t initialize per-thread data in the log copying thread which could cause XtraBackup to crash. Bug fixed…