pt-config-diff
来源:互联网 发布:小米手机照片导入mac 编辑:程序博客网 时间:2024/06/15 11:49
对比配置文件与配置文件、服务器与服务器 或者 配置文件与服务器 之前的参数差异。
1、用法
pt-config-diff [OPTION...] CONFIG CONFIG [CONFIG...]CONFIG可以是文件也可以是数据源名称,最少必须指定两个配置文件源,就像unix下面的diff命令一样,如果配置完全一样就不会输出任何东西
例1、比较本地和远程服务器配置差异
[root@slave159 test]# pt-config-diff h=192.168.60.159 --user=huang --password=huang h=192.168.61.42 --user=huang --password=huang35 config differencesVariable slave159 kfpanda========================= ========================= =========================basedir /opt/mysql-5.5.41 /usr/local/mysqlcharacter_sets_dir /opt/mysql-5.5.41/shar... /usr/local/mysql/share...datadir /u02/data_3307/ /home/opaqdata/data/event_scheduler ON OFFexpire_logs_days 3 0general_log ON OFFgeneral_log_file /u02/data_3307/slave15... /home/opaqdata/data/kf...hostname slave159 kfpandainnodb_version 5.5.41-tokudb-7.5.5 5.5.30-tokudb-7.0.1lc_messages_dir /opt/mysql-5.5.41/share/ /usr/local/mysql/share/log ON OFFlog_bin_trust_function... ON OFFlog_error /u02/data_3307/slave15... /home/opaqdata/data/kf...max_allowed_packet 5242880 1048576max_long_data_size 5242880 1048576open_files_limit 65534 2500pid_file /u02/data_3307/slave15... /home/opaqdata/data/kf...plugin_dir /opt/mysql-5.5.41/lib/... /usr/local/mysql/lib/p...query_cache_size 0 33554432query_cache_type OFF ONserver_id 159 1skip_name_resolve ON OFFslow_query_log_file /u02/data_3307/slave15... /home/opaqdata/data/kf...socket /tmp/mysqltwo.sock /tmp/mysql.socksort_buffer_size 31457280 2097152thread_stack 262144 512000tokudb_analyze_time 5 60tokudb_cache_size 16817350656 980219904tokudb_commit_sync OFF ONtokudb_load_save_space ON OFFtokudb_max_lock_memory 2102168832 122527488tokudb_read_block_size 65536 131072tokudb_row_format tokudb_fast tokudb_defaulttokudb_version tokudb-7.5.5 7.0.1version 5.5.41-tokudb-7.5.5-log 5.5.30-tokudb-7.0.1-log例2、比较配置文件和服务器配置
[root@slave159 test]# pt-config-diff /etc/my.cnf h=192.168.60.159 --user=huang --password=huang2 config differencesVariable /etc/my.cnf slave159========================= =========== ========sort_buffer_size 16777216 31457280table_open_cache 510 512例3、比较两个文件得差异
[root@slave159 test]# pt-config-diff /etc/my.cnf /opt/mysql-5.5.41/my.cnf 2 config differencesVariable /etc/my.cnf /opt/mysql-5.5.41/my.cnf========================= =========== ========================sort_buffer_size 16777216 31457280table_open_cache 510 512--help
[root@slave159 test]# pt-config-diff --helppt-config-diff diffs MySQL configuration files and server variables. CONFIG canbe a filename or a DSN. At least two CONFIG sources must be given. Likestandard Unix diff, there is no output if there are no differences. For moredetails, please use the --help option, or try 'perldoc/usr/local/bin/pt-config-diff' for complete documentation.Usage: pt-config-diff [OPTIONS] CONFIG CONFIG [CONFIG...]Options: --ask-pass Prompt for a password when connecting to 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. (This option does not specify a CONFIG; it's equivalent to --defaults-file.) --database=s -D Connect to this database --defaults-file=s -F Only read mysql options from the given file --help Show help and exit --host=s -h Connect to host --[no]ignore-case Compare the variables case-insensitively (default yes) --ignore-variables=a Ignore, do not compare, these variables --password=s -p Password to use for connection --pid=s Create the given PID file --port=i -P Port number to use for connection --[no]report Print the MySQL config diff report to STDOUT (default yes) --report-width=i Truncate report lines to this many characters (default 78) --set-vars=A Set the MySQL variables in this comma-separated list of variable=value pairs --socket=s -S Socket file to use for connection --user=s -u MySQL user if not current user --version Show version and exit --[no]version-check Check for the latest version of Percona Toolkit, MySQL, and other programs (default yes)Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=timeRules: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details.DSN syntax is key=value[,key=value...] Allowable DSN keys: KEY COPY MEANING === ==== ============================================= A yes Default character set D yes Default database F yes Only read default options from the given file P yes Port number to use for connection S yes Socket file to use for connection h yes Connect to host p yes Password to use when connecting u yes User for login if not current user If the DSN is a bareword, the word is treated as the 'h' key.Options and values after processing arguments: --ask-pass FALSE --charset (No value) --config /etc/percona-toolkit/percona-toolkit.conf,/etc/percona-toolkit/pt-config-diff.conf,/root/.percona-toolkit.conf,/root/.pt-config-diff.conf --database (No value) --defaults-file (No value) --help TRUE --host (No value) --ignore-case TRUE --ignore-variables (No value) --password (No value) --pid (No value) --port (No value) --report TRUE --report-width 78 --set-vars --socket (No value) --user (No value) --version FALSE --version-check TRUE
0 0
- pt-config-diff
- pt-config-diff
- pt-config-diff
- Failed to parse MySQL config at /usr/bin/pt-config-diff line 2979.
- Git log diff config高级进阶
- Git log diff config高级进阶
- pt
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- Linux系统安装Python
- Java IO 之 OutputStream源码
- bzoj1782: [Usaco2010 Feb]slowdown 慢慢游
- 默认拷贝构造函数究竟是什么
- hp一阶段考核
- pt-config-diff
- Maven详解
- 360笔试--行编辑器
- 测试常见面试题
- vi保存退出":x"与":wq"的区别
- 如何在Mac OS X上安装 Ruby运行环境
- 软件危机产生的原因
- 视频无线传输的实现方式
- 第一阶段总结