| MYSQLUC(1) | MySQL Utilities | MYSQLUC(1) |
NAME¶
mysqluc - Command line client for running MySQL UtilitiesSYNOPSIS¶
mysqluc [--help | --version | [ | --verbose | --quiet |] --width=<num> | --utildir=<path> | --execute <command list> <variable>=<value>]DESCRIPTION¶
This utility provides a command line environment for running MySQL Utilities. The mysqluc utility, hence console, allows users to execute any of the currently installed MySQL Utilities command. The option --utildir is used to provide a path to the MySQL Utilities if the location is different from when the utility is executed. The console has a list of console or base commands. These allow the user to interact with the features of the console itself. The list of base commands is shown below along with a brief description.:Command Description
---------------------- ---------------------------------------------------
help utilities Display list of all utilities supported.
help <utility> Display help for a specific utility.
help | help commands Show this list.
exit | quit Exit the console.
set <variable>=<value> Store a variable for recall in commands.
show options Display list of options specified by the user on
launch.
show variables Display list of variables.
<ENTER> Press ENTER to execute command.
<ESCAPE> Press ESCAPE to clear the command entry.
<DOWN> Press DOWN to retrieve the previous command.
<UP> Press UP to retrieve the next command in history.
<TAB> Press TAB for type completion of utility, option,
or variable names.
<TAB><TAB> Press TAB twice for list of matching type
completion (context sensitive).
$ mysqluc SERVER1=root@localhost
OPTIONS
•--version
show program's version number and exit
•--help
show the program's help page
•--verbose, -v
control how much information is displayed. For example, -v = verbose,
-vv = more verbose, -vvv = debug
•--quiet
suppress all informational messages
•--execute <commands>, -e <commands>
Execute commands and exit. Multiple commands are separated with semi-colons.
Note: some platforms may require double quotes around command list.
•--utildir <path>
location of utilities
•--width <number>
Display width
NOTES Using the --execute option or piping commands to the console may require quotes or double quotes (for example, on Windows).
EXAMPLES To launch the console, use this command:
$ mysqluc
$ mysqluc -e "help utilities"
Utility Description
---------------- ---------------------------------------------------------
mysqlindexcheck check for duplicate or redundant indexes
mysqlrplcheck check replication
mysqluserclone clone a MySQL user account to one or more new users
mysqldbcompare compare databases for consistency
mysqldiff compare object definitions among objects where the
difference is how db1.obj1 differs from db2.obj2
mysqldbcopy copy databases from one server to another
mysqlreplicate establish replication with a master
mysqldbexport export metadata and data from databases
mysqldbimport import metadata and data from files
mysqlmetagrep search metadata
mysqlprocgrep search process information
mysqldiskusage show disk usage for databases
mysqlserverinfo show server information
mysqlserverclone start another instance of a running server
$ mysqluc -e "set SERVER=root@host123; mysqldiskusage --server=\$SERVER" # Source on host123: ... connected. NOTICE: Your user account does not have read access to the datadir. Data sizes will be calculated and actual file sizes may be omitted. Some features may be unavailable. # Database totals: +--------------------+--------------+ | db_name | total | +--------------------+--------------+ ... | world | 0 | ... +--------------------+--------------+ Total database disk usage = 1,072,359,052 bytes or 1022.00 MB #...done.
$ echo "set SERVER=root@host123; mysqldiskusage --server=\$SERVER" | mysqluc
$ mysqluc SERVER=root@host123 VAR_A=57 -e "show variables" Variable Value -------- ----------------------------------------------------------------- SERVER root@host123 VAR_A 57
COPYRIGHT¶
SEE ALSO¶
For more information, please refer to the MySQL Utilities section of the MySQL Workbench Reference Manual, which is available online at http://dev.mysql.com/doc/workbench/en/.AUTHOR¶
Oracle Corporation (http://dev.mysql.com/).| 08/30/2013 | MySQL 1.3.4 |