MySQL Utilities


This is the MySQL™ Utilities Reference Manual. It documents both the GPL and commercial editions of the MySQL Utilities 1.3 release series through 1.3.6.

If you have not yet installed MySQL Utilities please download your free copy from the download site. MySQL Utilities is available for Windows, Mac OS X, and Linux variants.

For notes detailing the changes in each release, see the MySQL Utilities Release Notes.

For legal information, see the Legal Notices.

Document generated on: 2014-12-18 (revision: 41049)

Table of Contents

1 How to Install MySQL Utilities
1.1 Prerequisites
1.2 Source Code
1.3 Oracle and Red Hat Linux 6
1.4 Debian Linux
1.5 Microsoft Windows
1.6 Mac OS X
2 Introduction
2.1 Introduction to MySQL Utilities
2.2 Connection Parameters
3 MySQL Utilities Administrative Tasks
3.1 Database Operations
3.1.1 How Do I Provision a Slave?
3.1.2 How Do I Make a Copy of a Database on the Same Server?
3.1.3 How Can I Make a Copy of a Database and Change the Storage Engine?
3.1.4 How Can I Tell If a Table on Server X has the same Structure as the Same Table on Server Y?
3.1.5 How Can I Synchonize a Table on Two Servers Where Neither is Up-to-date?
3.2 General Operations
3.2.1 How Can I Find Out How Much Space My Data Uses?
3.2.2 My Server Crashed! I Need to Know the Structure of a Table. How Can I Do That?
3.2.3 Creating a New User With The Same Privileges as Another User
3.2.4 What Options Are Used With Each Utility?
3.2.5 I've Got Too Many Indexes! How Do I Know Which Ones to Drop?
3.2.6 I Need to Find an Object on My Server But All I Have is a Parital Name. How Do I Find All Objects with That Name Prefix?
3.2.7 How Can I Run a Process Every Night To Kill Certain Connections?
3.3 High Availability Operations
3.3.1 How Can I Use Replication?
3.3.2 How Do I Add New Servers to My Topology and Change Master Role
3.3.3 Setup Automatic Failover
3.3.4 Restore the Previous Master After Failover
3.3.5 How Can I Find All of the Slaves Attached to My Master Server?
3.4 Server Operations
3.4.1 How Do I Make A Temporary Copy of My Server For Testing?
3.4.2 How Can I Find What MySQL Servers Are Running?
3.5 Specialized Operations
3.5.1 How Do I Record Only Login Events?
3.5.2 How Do I Copy/Move The Audit Log?
3.5.3 How Do I Show All INSERT and UPDATE Queries That Failed?
3.5.4 How Do I Display Connections by the User 'root' and Show the Result in CSV Format?
4 Overview of MySQL Utilities
4.1 Database Operations
4.2 General Operations
4.3 High Availability Operations
4.4 Server Operations
4.5 Specialized Operations
5 Manual Pages
5.1 mysqlauditadmin
5.1.1 mysqlauditadmin — Allows users to perform maintenance action on the audit log
5.2 mysqlauditgrep
5.2.1 mysqlauditgrep — Allows users to search the current or an archived audit log
5.3 mysqldbcompare
5.3.1 mysqldbcompare — Compare Two Databases and Identify Differences
5.4 mysqldbcopy
5.4.1 mysqldbcopy — Copy Database Objects Between Servers
5.5 mysqldbexport
5.5.1 mysqldbexport — Export Object Definitions or Data from a Database
5.6 mysqldbimport
5.6.1 mysqldbimport — Import Object Definitions or Data into a Database
5.7 mysqldiff
5.7.1 mysqldiff — Identify Differences Among Database Objects
5.8 mysqldiskusage
5.8.1 mysqldiskusage — Show Database Disk Usage
5.9 mysqlfailover
5.9.1 mysqlfailover — Automatic replication health monitoring and failover
5.10 mysqlfrm
5.10.1 mysqlfrm — File reader for .frm files.
5.11 mysqlindexcheck
5.11.1 mysqlindexcheck — Identify Potentially Redundant Table Indexes
5.12 mysqlmetagrep
5.12.1 mysqlmetagrep — Search Database Object Definitions
5.13 mysqlprocgrep
5.13.1 mysqlprocgrep — Search Server Process Lists
5.14 mysqlreplicate
5.14.1 mysqlreplicate — Set Up and Start Replication Between Two Servers
5.15 mysqlrpladmin
5.15.1 mysqlrpladmin — Administration utility for MySQL replication
5.16 mysqlrplcheck
5.16.1 mysqlrplcheck — Check Replication Prerequisites
5.17 mysqlrplshow
5.17.1 mysqlrplshow — Show Slaves for Master Server
5.18 mysqlserverclone
5.18.1 mysqlserverclone — Clone Existing Server to Create New Server
5.19 mysqlserverinfo
5.19.1 mysqlserverinfo — Display Common Diagnostic Information from a Server
5.20 mysqluc
5.20.1 mysqluc — Command line client for running MySQL Utilities
5.21 mysqluserclone
5.21.1 mysqluserclone — Clone Existing User to Create New User
6 Extending MySQL Utilities
6.1 Introduction to extending the MySQL Utilities
6.2 MySQL Utilities sample
6.3 Specialized Operations
6.3.1 mysql.utilities.command.grep — Search Databases for Objects
6.3.2 mysql.utilities.command.proc — Search Processes on Servers
6.4 Parsers
6.4.1 mysql.utilities.parser — Parse MySQL Log Files
7 MySQL Utilities Testing (MUT)
7.1 mut — MySQL Utilities Testing
8 Appendix
8.1 MySQL Utilities FAQ
8.2 MySQL Utilities Change History