Tuesday, 20 August 2013

MySQL tools


These include yahoo-specific and publicly-available tools used at yahoo.

Tool suites

  • percona_toolkit - collection of useful db administration tools
    • pt-table-sync - used to check or fix sync between master and slave.
    • pt-online-schema-change - used to make non-disruptive schema changes!
    • wip pt-stalk - event driven, data collection tool (or service)
    • wip pt-sift - used to browse files created by pt-stalk
    • wip pt-mext - used on status variable data samples to process rates of change and display them in columns
    • pt-kill - query/connection killer. match based on command, user, query run time, etc. e.g.
               # kill all processes except those for users root, event_scheduler, replicant
               # (will run every 30s by default until killed with ^C, pt-kill --stop, or sentinel file)
               pt-kill --ask-pass \
                  --match-all --ignore-user '(root|event_scheduler|replicant)' \
                  --victims all --print \
                  --kill
               # daemonize and wake up every 15 seconds
               # kill queries with SQL matching the given string/regex
               pt-kill --print -u root -p$pwr  \
               --match-info 'FROM target_creative WHERE creative_id=' \
               --victims all --kill \
               --daemonize --interval 15 --log /home/crockerm/kill-target_creative.log

Configuration

High Availability

Analysis

Backup & Recovery

other pages (unreviewed):
  • MySQLStandardBackup - topic overview, covering tools for different scenarios
  • MySQLBackups
  • Binlog purge/backup - yinst package to perform scheduled purges of binary logs, with optional backup, and optionally checking slave state to prevent purging logs that slaves haven't processed yet.

Monitoring

User Management

Auth plugins

Authentication plugins support was added in MySQL 5.5. These should probably have their own page:

Miscellaneous

Unsupported and Deprecated Tools

  • maatkit - Migrate to percona_toolkit, which is a workalike. Unmaintained since 2011.
  • MySQLGadgets - unmaintained since 2008; try mysqladmin, ysar_mysql51, or percona_toolkit for a supported alternative
  • YInst:mytop and mytop41 - top-like view of mysql threads; unmaintained since 2007
  • YDBSlow - concept gui query/schema analysis tool proposed at Tech Pulse 2009; try Tempest? and pt-query-digest (percona_toolkit) meanwhile.
  • MySQLProxy -- deprecated as of 2012. Use MySQLStatus instead.

No comments:

Post a Comment