pt工具的使用(2)--pt-variable-advisor的使用

简介:pt-variable-advisor用途是用来分析配置参数,并提出相应的配置建议。

--ask-pass            Prompt for a password when connecting to MySQL  链接mysql时提示输入密码
--charset=s           -A  Default character set  默认字符集
--config=A               Read this comma-separated list of config files; if specified, this must be the first option on the                                                       command line     阅读这个以逗号分隔的配置文件列表; 如果指定,这必须是第一个选项命令行
--daemonize              Fork to the background and detach from the shell
 --database=s         -D  Connect to this database
 --defaults-file=s    -F  Only read mysql options from the given file 仅从给定文件中读取mysql选项
  --help                   Show help and exit
  --host=s             -h  Connect to host
  --ignore-rules=h         Ignore these rule IDs
  --password=s         -p  Password to use when connecting
  --pid=s                  Create the given PID file  创建给定的pid文件
  --port=i             -P  Port number to use for connection
  --set-vars=A             Set the MySQL variables in this comma-separated list of variable=value pairs

                                   在此逗号分隔列表中设置MySQL变量变量=值对
  --socket=s           -S  Socket file to use for connection
  --source-of-variables=s  Read SHOW VARIABLES from this source (default mysql) 

                                         从这个源读取SHOW VARIABLES(默认mysql)
  --user=s             -u  User for login if not current user
  --verbose            -v  Increase verbosity of output (default 1)  增加输出的详细程度(默认值为1)
  --version                Show version and exit
  --[no]version-check      Check for the latest version of Percona Toolkit,MySQL, and other programs (default yes) 

                                     检查Percona Toolkit,MySQL和其他程序的最新版本(默认是)

 

使用方法用例:

# 首先查询当前配置写入到指定文件

mysql -uroot -p -e "show global variables">/home/vars.txt

 pt-variable-advisor --source-of-variables vars.txt

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值