MySQL Tools
The MySQL distros come with extra tools/scripts: mysqldumpslow, mysqldump, mysql_zap, etc. I've never known
a DBA for whom these tools sufficed. The open-source community has created a sizable number of MySQL
and MySQL-related tools which fill pretty much every niche and need. As a full-time developer of such tools,
these projects are my speciality. All code listed here is free and open-source.
MySQL Forge is a repository for MySQL projects, tools, code snippets
and other odds and ends. In my opinion, it's not focused enough to be useful which is why I maintain
this page. The tools here are ones that I know top MySQL professionals use regularly and recommend.
Hack MySQL Scripts
These are the scripts I created many years ago when no such (better) scripts existed. They have since
been retired and replaced by Maatkit tools. I leave them here for historicity and because they are
mentioned in several books (one of which was published in early 2010).
Tools
Profile
- Project: none, archived here
- Status: retired, replaced by Maatkit tools
- Tested: no
- Documented: yes, online and included with releases
- Language: Perl
- Design: procedural, partly modular
Maatkit (mk)
Maatkit is a collection of 20+ scripts originally created
by Baron Schwartz. These scripts include mk-table-sync,
mk-query-digest, mk-archiver, mk-heart, etc. I am the full-time developer and maintainer for
all the scripts. Baron and myself are employed by Percona which
sponsors most Maatkit development.
Tools
- mk-table-checksum - Perform an online replication consistency check, or checksum MySQL tables efficiently on one or many servers.
- mk-table-sync - Synchronize MySQL tables efficiently.
- mk-query-digest - Parses logs and more. Analyze, transform, filter, review and report on queries.
- mk-archiver, mk-find, mk-heartbeat, mk-kill, mk-parallel-dump, mk-parallel-restore, mk-slave-delay, mk-upgrade, ...
Profile
- Project: Maatkit
- Status: active, full-time, professional development
- Tested: yes, over 2,000 tests
- Documented: yes, POD in each tool, POD reproduced online at each release
- Language: Perl
- Design: procedural, highly modular
boots
Boots is an extensible command line database client for Drizzle and MySQL. It looks and feels
almost like the old, venerable mysql cli, but it has modern features like "lingos" and pipes.
In my opinion, it's the MySQL-esque cli of the future for the MySQL-esque RDMS of the future, Drizzle.
It still works with MySQL, though.
Profile
- Project: boots
- Status: active, professional development
- Tested: yes
- Documented: in-program help, not really documented yet since it's still in devel
- Language: Python
- Design: object-oriented, extensible
Percona Projects
Percona develops and sponsors various MySQL tools,
programs, patches, etc.--including Maatkit. These range from backup programs to data recovery tools.
There's hardly a way to summarize them all, so just check out the project page.
Profile
- Project: Percona Projects
- Status: active, full-time, professional development
- Tested: unknown
- Documented: somewhat online, larger documentation effort currently in progress
- Language: C, C++, Perl
- Design: various
Aspersa
Maatkit once had a masse of "utilities" which didn't really belong in Maatkit proper,
so Baron moved them to separted project: aspersa. Most of the tools are not directly
MySQL-related, but they're in the ecosystem so I've included them here. (If nothing
else, they were born from a pure MySQL project: Maatkit.)
Tools
- bt-aggregate - Aggregate and print GDB backtraces.
- iodump - Compute per-PID I/O stats for Linux when iotop/pidstat/iopp are not available.
- mext2 - Columnize output of mysqladmin.
- snoop-to-tcpdump - Formats 'snoop' output the same way as 'tcpdump'.
- More tools added as needed...
Profile
- Project: aspersa
- Status: developed as needed
- Tested: no
- Documented: minimal
- Language: Perl, bash
- Deisgn: whatever works
Kontrollkit
Kontrollkit is a collection of scripts to simplify daily MySQL DBA responsibilities.
Like Maatkit, it is a suite of many tools backed by a business: Kontrollsoft.
Tools
- kt-backup-parallel - runs mysql backups in parallel super fast, has lots of reporting features.
- kt-backup-ai - runs mysql backups standard mysqldump method but adds nice features like email reporting and backup completion checking as well as compression, also adds disk space checking and size analysis before running the backup to ensure you don't use up 100% partition space with a backup.
- kt-check-replication - script to report on replication status for slave servers.
- kt-connections-log - logs connections to mysql to disk, reports on threshold overages.
- kt-flush-tables-sequence - runs through schema.tables to flush in sequence before global flush.
- kt-mysql-systemcheck - generates a report for point-in-time system status that is useful for troubleshooting MySQL servers.
- Several more tools...
Profile
- Project: kontrollkit
- Status: active
- Tested: no
- Documented: no
- Language: Perl, Python
- Design: procedural
MMM
MMM does monitoring/failover and management of MySQL master-master replication configurations.
Profile
- Project: MMM 2.x
- Status: semi-active, professional and volunteer development
- Tested: no
- Documented: yes, POD and online
- Language: Perl
- Design: procedural, highly modular
innotop
innotop is a 'top' clone for MySQL. It was created by Baron Schwartz.
Profile
- Project: innotop
- Status: no longer in development
- Tested: no
- Documented: yes, POD
- Language: Perl
- Design: procedural, partly modular
Schema Sync
Schema Sync will generate the SQL necessary to migrate the schema of a source
database to a target database (patch script), as well as a the SQL necessary to undo the changes after you apply
them (revert script).
Profile
- Project: SchemaSync
- Status: active development
- Tested: yes
- Documented: basics
- Language: Python
- Design: procedural, modular
rtime
rtime
is a program that records and reports query response times by sniffing MySQL protocol traffic.
It's coded by another Percona employee, Ignacio Nin. It's meant to be small and light-weight, filling
a role somewhere between mysqlsniffer and mk-query-digest --type tcdpump.
Profile
- Project: rtime
- Status: active development
- Tested: no
- Documented: yes
- Language: C
- Design: procedural
openark kit
The openark kit is a set of utilities for MySQL.
They solve everyday maintenance tasks, which may be complicated or time consuming to work by hand.
The kit was created and is maintained by Shlomi Noach.
Tools
- oak-apply-ri - apply referential integrity on two columns with parent-child relationship.
- oak-block-account - block or release MySQL users accounts, disabling them or enabling them to login.
- oak-chunk-update - Perform long, non-blocking UPDATE/DELETE operation in auto managed small chunks.
- oak-kill-slow-queries - terminate long running queries.
- oak-modify-charset - change the character set (and collation) of a textual column.
- oak-online-alter-table - Perform a non-blocking ALTER TABLE operation.
- oak-purge-master-logs - purge master logs, depending on the state of replicating slaves.
- oak-security-audit - audit accounts, passwords, privileges and other security settings.
- oak-show-limits - show AUTO_INCREMENT free space.
- oak-show-replication-status - show how far behind are replicating slaves on a given master.
Profile
- Project: openarkkit
- Status: active, professional development
- Tested: no
- Documented: yes, online
- Language: Python
- Design: procedural
mycheckpoint
Shlomi's other tool is mycheckpoint.
mycheckpoint is an open source monitoring utility for MySQL, with strong emphasis on user accessibility to monitored data.
Profile
- Project: mycheckpoint
- Status: active, professional development
- Tested: no
- Documented: yes, online
- Language: Python
- Design: procedural
MySQL Sandbox
MySQL Sandbox, created by Giuseppe Maxia, is a set of tools
(and Perl modules) that allow you to create isolated instances (sandboxes) of MySQL servers in
various configurations (standalone, replication, etc.). MySQL sandboxes are useful for testing
because they setup and tear down quickly and are self-contained, not interfering with a default
MySQL server and its data, port, socket, etc.
Profile
- Project: MySQL Sandbox
- Status: active, professional development
- Tested: yes
- Documented: yes
- Language: Perl
- Design: procedural, modular
MySQL Cacti Templates
Although I've never used and know nothing about Cacti,
I know that these MySQL Cacti
templates are used extensively. Based on questions and issues I see related to MySQL
monitoring with Cacti graphs, it seems that Cacti templates can be difficult to config
correctly/well so these templates help make it easier.
Profile
- Project: mysql-cacti-templates
- Status: active, professional development
- Tested: yes
- Documented: yes
- Language: Perl, PHP
- Design: procedural