mysql utilities1.6.4_MySQL Utilities工具包概述及安装

1、通过mysqluc获取帮助

###可以通过调用mysqluc命令行工具来获取这些工具的帮助信息

### mysqluc提供一个自带的命令行提示符窗口,在这个窗口下也可以完成相应的命令操作

[root@node1 ~]# mysqluc

Launching console ...

Welcome to the MySQL Utilities Client (mysqluc) version 1.6.4

Copyright (c) 2010, 2016 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 the version 2 of the GNU General Public License.

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 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 = 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.

Press ENTER to execute command.

Press ESCAPE to clear the command entry.

Press DOWN to retrieve the previous command.

Press UP to retrieve the next command in history.

Press TAB for type completion of utility, option,

or variable names.

Press TAB twice for list of matching type

completion (context sensitive).

###查看utilities包中所有的命令行工具

mysqluc> help utilities

Utility Description

----------------- --------------------------------------------------------

mysqlauditadmin audit log maintenance utility

mysqlauditgrep audit log search utility

mysqlbinlogmove binary log relocate utility

mysqlbinlogpurge purges unnecessary binary log files

mysqlbinlogrotate rotates the active binary log file

mysqldbcompare compare databases for consistency

mysqldbcopy copy databases from one server to another

mysqldbexport export metadata and data from databases

mysqldbimport import metadata and data from files

mysqldiff compare object definitions among objects where the

difference is how db1.obj1 differs from db2.obj2

mysqldiskusage show disk usage for databases

mysqlfailover automatic replication health monitoring and failover

mysqlfrm show CREATE TABLE from .frm files

mysqlgrants display grants per object

mysqlindexcheck check for duplicate or redundant indexes

mysqlmetagrep search metadata

mysqlprocgrep search process information

mysqlreplicate establish replication with a master

mysqlrpladmin administration utility for MySQL replication

mysqlrplcheck check replication

mysqlrplms establish multi-source replication

mysqlrplshow show slaves attached to a master

mysqlrplsync replication synchronization checker utility

mysqlserverclone start another instance of a running server

mysqlserverinfo show server information

mysqlslavetrx skip transactions on slaves

mysqluserclone clone a MySQL user account to one or more new users

###也可直接在mysqluc提示符下输入 help command 来获取对应命令的帮助信息,如下

mysqluc> help mysqlauditadmin

Usage: mysqlauditadmin --server=user:pass@host:port --show-options

# Author : Leshami

# Blog : http://www.linuxidc.com

mysqlauditadmin - audit log maintenance utility

Options:

Option Description

------------------------- ------------------------------------------------

--version show program's version number and exit

--help display this help message and exit

--license display program's license and exit

--server=SERVER connection information for the server in the

form:

[:]@[:][:]

or [:][:] or

path>[].

--audit-log-name=LOG_NAME full path and file name for the audit log file.

Used for stats and copy options.

--show-options display the audit log system variables.

--remote-login=RLOGIN user name and host to be used for remote login

for copying log files. Format:

: Password will be prompted.

--file-stats display the audit log file statistics.

--copy-to=COPY_LOCATION the location to copy the audit log file

specified. The path must be locally accessible

for the current user.

--value=VALUE value used to set variables based on the command

specified. See --help for list per command.

--ssl-ca=SSL_CA path to a file that contains a list of trusted

SSL CAs.

--ssl-cert=SSL_CERT name of the SSL certificate file to use for

establishing a secure connection.

--ssl-key=SSL_KEY name of the SSL key file to use for establishing

a secure connection.

--ssl=SSL specifies if the server connection requires use

of SSL. If an encrypted connection cannot be

established, the connection attempt fails. By

default 0 (SSL not required).

-v, --verbose control how much information is displayed. e.g.,

-v = verbose, -vv = more verbose, -vvv = debug

Available Commands: copy - copy the audit log to

a locally accessible path policy - set the audit

log policy Values = ALL, NONE, LOGINS, QUERIES,

DEFAULT rotate - perform audit log rotation

rotate_on_size - set the rotate log size limit

for auto rotation Values = 0, 4294967295

2、直接在shell提示符下获取命令帮助

###如下示例

[root@node1 ~]# mysqlfailover --help|head

MySQL Utilities mysqlfailover version 1.6.4

License type: GPLv2

Usage: mysqlfailover --master=root@localhost --discover-slaves-login=root

--candidates=root@host123:3306,root@host456:3306

mysqlfailover - automatic replication health monitoring and failover

Options:

--version show program's version number and exit

--help display this help message and exit

--license display program's license and exit

3、基于Linux man获取命令帮助

###如下示例

root@node1 ~]# man mysqlfailover

MYSQLFAILOVER(1) MySQL Utilities MYSQLFAILOVER(1)

NAME

mysqlfailover - Automatic replication master failover

SYNOPSIS

mysqlfailover [options]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值