2.1 Introduction to MySQL Utilities

What are the MySQL Utilities?

It is a package of utilities that are used for maintenance and administration of MySQL servers. These utilities encapsulate a set of primitive commands, and bundles them so they can be used to perform macro operations with a single command. They can be installed via MySQL Workbench, or as a standalone package.

The utilities are written in Python, available under the GPLv2 license, and are extendable using the supplied library. They are designed to work with Python versions 2.6 or later and there is no support (yet) for Python v3.1.

How do we access the MySQL Utilities?

There are two ways to access the utilities from within the MySQL Workbench. Either use Tools, Start Shell for MySQL Utilities from the main Workbench toolbar, or click the MySQL Utilities icon from the Workbench home page. Both methods will open a terminal/shell window in the mysqluc utility shell. Type "help" to list the available commands.

Figure 2.1 Starting MySQL Utilities from Workbench

Starting MySQL Utilities from Workbench

You can launch any of the utilities listed by typing the name of the command. To find out what options are available, use the option, or read the appropriate manual page.

The utilities are designed to work on MySQL systems with grants enabled but can also operate on servers started with the --skip-grant-tables startup option. However, this practice is strongly discouraged and should be used only in situations where it is appropriate or deemed a last resort.