MySQL Tools

The openark kit provides common utilities to administer, diagnose and audit MySQL databases.

The available tools are:

  • 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.

Most utilities require MySQL 5.0 or above.

All utilities are written in Python (>= 2.3) and tested on Linux machines. They should all work on other unix and unix-like operating systems. There is currently no plan to test them on Windows, though they may work out of the box.

And right from Facebook arsenal, the social networking giant ported openark kit to PHP with its Online Schema Change utility to update its database indexes and juice query times without staging the changes on test servers.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s