Need help with
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

161 Stars 62 Forks GNU General Public License v2.0 39 Commits 2 Opened issues


MySQL, updated and improved

Services available


Need anything else?

Contributors list

# 300,523
25 commits
# 354,110
11 commits
# 214,436
1 commit


How to use

Download and run

If you don't like downloading anything and you do like living dangerously, you could instead run it with something like this¹:

curl -L | bash

About this repository

This is the script originally developed by Matthew Montgomery, and previously hosted at This version has been updated and improved for newer versions of MySQL, Percona Server, and MariaDB. This Github repository was created with Matthew's permission by Dan Reif, but Matthew has no control over it; in other words, please don't bother Matthew with questions about this repository!

This repository will be used to handle ongoing development and bugfixes for this script. Please file bug reports here. Pull requests are welcomed.

About this script

This script takes information from

to produce sane recomendations for tuning server variables.

It (attempts to be!) compatible with all versions of MySQL 3.23 and higher (including 5.x), as well as MariaDB, and Percona Server for MySQL.²

Currently it handles recomendations for the following:

  • Slow Query Log
  • Max Connections
  • Worker Threads
  • Key Buffer [MyISAM only]
  • Query Cache
  • Sort Buffer
  • Joins
  • Temp Tables
  • Table (Open & Definition) Cache
  • Table Locking
  • Table Scans (
    ) [MyISAM only]
  • InnoDB Status

Recent Changes

  • Updated to (at least mostly) support MySQL 5.7+ and MariaDB
  • A lot of cleanup of the underlying code
  • Better handling of terminals and redirection (got rid of the hardcoded color sequences, switched to proper terminfo)
  • Fixed the old
    ./ line 402: export: `2097152': not a valid identifier

More, as always, in the changelog.

Legal Stuff

Use of this software is governed by its LICENSE, regardless of how it is accessed or by whom it is used. Follow the license, dammit.

Some of the terms used in this script or in the documentation surrounding it may be copyrighted, trademarked, or otherwise owned by external entities including but not limited to Oracle, Percona, MariaDB Corporation Ab, and others. These terms are used solely for identification of products, and the interoperability of this script with these or any other products, even if explicitly claimed, is nonetheless not guaranteed by any author. No affiliation with or licensing from these entities is stated nor implied. Anyone who says otherwise is itchin' for a fight.


¹: Running it without downloading it and reading it first is a truly awful choice, and I arguably shouldn't put this command here. Then again, if you are the sort of person who even wonders how to run a script with root access to your database by piping it into Bash, you're probably the sort of person I can't convince not to do so. At least these instructions are ever-so-slightly safer than what'll appear on some Stack Overflow if I didn't put this here.

²: ... and anything else sufficiently MySQLish to export the status variables it uses to run.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.