MySQL Utilities

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.

The utilities are written in Python, available under the GPLv2 license, and are extensible 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?

The MySQL Utilities are command line scripts, which by default are available in your system's PATH. Alternatively, if both MySQL Utilities and MySQL Workbench are installed, you can access their location from MySQL Workbench by selecting Tools from the main menu, and then Start Shell for MySQL Utilities. This opens a terminal/shell window in the mysqluc utility shell. Type "help" to list the available commands.

Figure 2.1 Starting MySQL Utilities from Workbench

Content is described in the surrounding text.

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.