MySQL 工作台 /
附录 F MySQL 实用程序
MySQL Utilities 是一个用于维护和管理 MySQL 服务器的实用程序包。这些实用程序封装了一组原始命令,并将它们捆绑在一起,以便它们可以用于通过单个命令执行宏操作。它们可以与 MySQL Workbench 一起安装或作为独立包安装。
它们是一组命令行实用程序和一个 Python 库,用于简化常见任务的完成。该库完全用 Python 编写,这意味着无需安装任何其他工具或库即可运行。它目前设计用于 Python v2.6 或更高版本,不支持 Python v3.1。
这些实用程序在 GPLv2 许可下可用,并且可以使用提供的库进行扩展。
安装 MySQL 实用程序
MySQL Utilities 开发在别处管理,需要单独下载。尝试在未安装 MySQL 实用程序时启动它们将提示下载和安装它们。有关其他信息,请参阅 MySQL 实用程序手册。
笔记
MySQL Workbench 在系统中搜索mysqluc MySQL UtilityPATH
以确定是否安装了MySQL Utilities。
从 MySQL Workbench 打开 MySQL 实用程序
要从 MySQL Workbench 打开 MySQL Utility mysqluc(MySQL Utilities Unified Console),单击工具
,然后从菜单中单击Start Shell for MySQL Utilities
。以下输出显示了help
执行了命令的 MySQL Utilities 控制台窗口。
Welcome to the MySQL Utilities Client (mysqluc) version 1.6.5
Copyright (c) 2010, 2017 Oracle and/or its affiliates. All rights reserved.
This is a release of dual licensed MySQL Utilities. For the avoidance of
doubt, this particular copy of the software is released
under a commercial license and the GNU General Public License does not apply.
MySQL Utilities is brought to you by Oracle.
Type 'help' for a list of commands or press TAB twice for list of utilities.
mysqluc> help
Command Description
---------------------- ---------------------------------------------------
help utilities Display list of all utilities supported.
help <utility> Display help for a specific utility.
show errors Display errors captured during the execution of the
utilities.
clear errors clear captured errors.
show last error Display the last error captured during the
execution of the utilities
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).