my_print_defaults 命令打印配置信息

[root@166087 ~]# my_print_defaults --defaults-file=/application/mysql/conf/my.cnf client;
--port=3306
--socket=/tmp/mysql.sock

[root@166087 ~]# my_print_defaults --defaults-file=/application/mysql/conf/my.cnf mysqld
--port=3306
--socket=/tmp/mysql.sock
--skip-external-locking
--key_buffer_size=16M
--max_allowed_packet=1M
--table_open_cache=64
--sort_buffer_size=512K
--net_buffer_length=8K
--read_buffer_size=256K
--read_rnd_buffer_size=512K
--myisam_sort_buffer_size=8M
--log-bin=mysql-bin
--binlog_format=mixed
--server-id=1

[root@166087 ~]# my_print_defaults --help
my_print_defaults  Ver 1.6 for Linux at i686
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Prints all arguments that is give to some program using the default files
Usage: my_print_defaults [OPTIONS] groups
  -c, --config-file=name
                      Deprecated, please use --defaults-file instead. Name of
                      config file to read; if no extension is given, default
                      extension (e.g., .ini or .cnf) will be added
  -#, --debug[=#]     This is a non-debug version. Catch this and exit
  -c, --defaults-file=name
                      Like --config-file, except: if first option, then read
                      this file only, do not read global or per-user config
                      files; should be the first option
  -e, --defaults-extra-file=name
                      Read this file after the global config file and before
                      the config file in the users home directory; should be
                      the first option
  -g, --defaults-group-suffix=name
                      In addition to the given groups, read also groups with
                      this suffix
  -e, --extra-file=name
                      Deprecated. Synonym for --defaults-extra-file.
  -n, --no-defaults   Return an empty string (useful for scripts).
  -?, --help          Display this help message and exit.
  -v, --verbose       Increase the output level
  -V, --version       Output version information and exit.

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /application/mysql5.5/etc/my.cnf ~/.my.cnf

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
config-file                       my
defaults-file                     my
defaults-extra-file               (No default value)
defaults-group-suffix             (No default value)
extra-file                        (No default value)

Example usage:
my_print_defaults --defaults-file=example.cnf client mysql


你可能感兴趣的:(my_print_defaults 命令打印配置信息)