运维联盟俱乐部

 找回密码
 立即注册
查看: 2097|回复: 0

command-mysql

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2021-12-15 15:54:41 | 显示全部楼层 |阅读模式
    1. [root@vm1 ~]# mysql --help
    2. mysql  Ver 8.0.27 for Linux on x86_64 (MySQL Community Server - GPL)
    3. Copyright (c) 2000, 2021, Oracle and/or its affiliates.

    4. Oracle is a registered trademark of Oracle Corporation and/or its
    5. affiliates. Other names may be trademarks of their respective
    6. owners.

    7. Usage: mysql [OPTIONS] [database]
    8.   -?, --help          Display this help and exit.
    9.   -I, --help          Synonym for -?
    10.   --auto-rehash       Enable automatic rehashing. One doesn't need to use
    11.                       'rehash' to get table and field completion, but startup
    12.                       and reconnecting may take a longer time. Disable with
    13.                       --disable-auto-rehash.
    14.                       (Defaults to on; use --skip-auto-rehash to disable.)
    15.   -A, --no-auto-rehash
    16.                       No automatic rehashing. One has to use 'rehash' to get
    17.                       table and field completion. This gives a quicker start of
    18.                       mysql and disables rehashing on reconnect.
    19.   --auto-vertical-output
    20.                       Automatically switch to vertical output mode if the
    21.                       result is wider than the terminal width.
    22.   -B, --batch         Don't use history file. Disable interactive behavior.
    23.                       (Enables --silent.)
    24.   --bind-address=name IP address to bind to.
    25.   --binary-as-hex     Print binary data as hex. Enabled by default for
    26.                       interactive terminals.
    27.   --character-sets-dir=name
    28.                       Directory for character set files.
    29.   --column-type-info  Display column type information.
    30.   -c, --comments      Preserve comments. Send comments to the server. The
    31.                       default is --skip-comments (discard comments), enable
    32.                       with --comments.
    33.   -C, --compress      Use compression in server/client protocol.
    34.   -#, --debug[=#]     This is a non-debug version. Catch this and exit.
    35.   --debug-check       This is a non-debug version. Catch this and exit.
    36.   -T, --debug-info    This is a non-debug version. Catch this and exit.
    37.   -D, --database=name Database to use.
    38.   --default-character-set=name
    39.                       Set the default character set.
    40.   --delimiter=name    Delimiter to be used.
    41.   --enable-cleartext-plugin
    42.                       Enable/disable the clear text authentication plugin.
    43.   -e, --execute=name  Execute command and quit. (Disables --force and history
    44.                       file.)
    45.   -E, --vertical      Print the output of a query (rows) vertically.
    46.   -f, --force         Continue even if we get an SQL error.
    47.   --histignore=name   A colon-separated list of patterns to keep statements
    48.                       from getting logged into syslog and mysql history.
    49.   -G, --named-commands
    50.                       Enable named commands. Named commands mean this program's
    51.                       internal commands; see mysql> help . When enabled, the
    52.                       named commands can be used from any line of the query,
    53.                       otherwise only from the first line, before an enter.
    54.                       Disable with --disable-named-commands. This option is
    55.                       disabled by default.
    56.   -i, --ignore-spaces Ignore space after function names.
    57.   --init-command=name SQL Command to execute when connecting to MySQL server.
    58.                       Will automatically be re-executed when reconnecting.
    59.   --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
    60.   -b, --no-beep       Turn off beep on error.
    61.   -h, --host=name     Connect to host.
    62.   --dns-srv-name=name Connect to a DNS SRV resource
    63.   -H, --html          Produce HTML output.
    64.   -X, --xml           Produce XML output.
    65.   --line-numbers      Write line numbers for errors.
    66.                       (Defaults to on; use --skip-line-numbers to disable.)
    67.   -L, --skip-line-numbers
    68.                       Don't write line number for errors.
    69.   -n, --unbuffered    Flush buffer after each query.
    70.   --column-names      Write column names in results.
    71.                       (Defaults to on; use --skip-column-names to disable.)
    72.   -N, --skip-column-names
    73.                       Don't write column names in results.
    74.   --sigint-ignore     Ignore SIGINT (CTRL-C).
    75.   -o, --one-database  Ignore statements except those that occur while the
    76.                       default database is the one named at the command line.
    77.   --pager[=name]      Pager to use to display results. If you don't supply an
    78.                       option, the default pager is taken from your ENV variable
    79.                       PAGER. Valid pagers are less, more, cat [> filename],
    80.                       etc. See interactive help (\h) also. This option does not
    81.                       work in batch mode. Disable with --disable-pager. This
    82.                       option is disabled by default.
    83.   -p, --password[=name]
    84.                       Password to use when connecting to server. If password is
    85.                       not given it's asked from the tty.
    86.   -,, --password1[=name]
    87.                       Password for first factor authentication plugin.
    88.   -,, --password2[=name]
    89.                       Password for second factor authentication plugin.
    90.   -,, --password3[=name]
    91.                       Password for third factor authentication plugin.
    92.   -P, --port=#        Port number to use for connection or 0 for default to, in
    93.                       order of preference, my.cnf, $MYSQL_TCP_PORT,
    94.                       /etc/services, built-in default (3306).
    95.   --prompt=name       Set the mysql prompt to this value.
    96.   --protocol=name     The protocol to use for connection (tcp, socket, pipe,
    97.                       memory).
    98.   -q, --quick         Don't cache result, print it row by row. This may slow
    99.                       down the server if the output is suspended. Doesn't use
    100.                       history file.
    101.   -r, --raw           Write fields without conversion. Used with --batch.
    102.   --reconnect         Reconnect if the connection is lost. Disable with
    103.                       --disable-reconnect. This option is enabled by default.
    104.                       (Defaults to on; use --skip-reconnect to disable.)
    105.   -s, --silent        Be more silent. Print results with a tab as separator,
    106.                       each row on new line.
    107.   -S, --socket=name   The socket file to use for connection.
    108.   --server-public-key-path=name
    109.                       File path to the server public RSA key in PEM format.
    110.   --get-server-public-key
    111.                       Get server public key
    112.   --ssl-mode=name     SSL connection mode.
    113.   --ssl-ca=name       CA file in PEM format.
    114.   --ssl-capath=name   CA directory.
    115.   --ssl-cert=name     X509 cert in PEM format.
    116.   --ssl-cipher=name   SSL cipher to use.
    117.   --ssl-key=name      X509 key in PEM format.
    118.   --ssl-crl=name      Certificate revocation list.
    119.   --ssl-crlpath=name  Certificate revocation list path.
    120.   --tls-version=name  TLS version to use, permitted values are: TLSv1, TLSv1.1,
    121.                       TLSv1.2, TLSv1.3
    122.   --ssl-fips-mode=name
    123.                       SSL FIPS mode (applies only for OpenSSL); permitted
    124.                       values are: OFF, ON, STRICT
    125.   --tls-ciphersuites=name
    126.                       TLS v1.3 cipher to use.
    127.   -t, --table         Output in table format.
    128.   --tee=name          Append everything into outfile. See interactive help (\h)
    129.                       also. Does not work in batch mode. Disable with
    130.                       --disable-tee. This option is disabled by default.
    131.   -u, --user=name     User for login if not current user.
    132.   -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
    133.   -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
    134.   -v, --verbose       Write more. (-v -v -v gives the table output format).
    135.   -V, --version       Output version information and exit.
    136.   -w, --wait          Wait and retry if connection is down.
    137.   --connect-timeout=# Number of seconds before connection timeout.
    138.   --max-allowed-packet=#
    139.                       The maximum packet length to send to or receive from
    140.                       server.
    141.   --net-buffer-length=#
    142.                       The buffer size for TCP/IP and socket communication.
    143.   --select-limit=#    Automatic limit for SELECT when using --safe-updates.
    144.   --max-join-size=#   Automatic limit for rows in a join when using
    145.                       --safe-updates.
    146.   --show-warnings     Show warnings after every statement.
    147.   -j, --syslog        Log filtered interactive commands to syslog. Filtering of
    148.                       commands depends on the patterns supplied via histignore
    149.                       option besides the default patterns.
    150.   --plugin-dir=name   Directory for client-side plugins.
    151.   --default-auth=name Default authentication client-side plugin to use.
    152.   --binary-mode       By default, ASCII '\0' is disallowed and '\r\n' is
    153.                       translated to '\n'. This switch turns off both features,
    154.                       and also turns off parsing of all clientcommands except
    155.                       \C and DELIMITER, in non-interactive mode (for input
    156.                       piped to mysql or loaded using the 'source' command).
    157.                       This is necessary when processing output from mysqlbinlog
    158.                       that may contain blobs.
    159.   --connect-expired-password
    160.                       Notify the server that this client is prepared to handle
    161.                       expired password sandbox mode.
    162.   --network-namespace=name
    163.                       Network namespace to use for connection via tcp with a
    164.                       server.
    165.   --compression-algorithms=name
    166.                       Use compression algorithm in server/client protocol.
    167.                       Valid values are any combination of
    168.                       'zstd','zlib','uncompressed'.
    169.   --zstd-compression-level=#
    170.                       Use this compression level in the client/server protocol,
    171.                       in case --compression-algorithms=zstd. Valid range is
    172.                       between 1 and 22, inclusive. Default is 3.
    173.   --load-data-local-dir=name
    174.                       Directory path safe for LOAD DATA LOCAL INFILE to read
    175.                       from.
    176.   --fido-register-factor=name
    177.                       Specifies authentication factor, for which registration
    178.                       needs to be done.
    179.   --oci-config-file=name
    180.                       Specifies the location of the OCI configuration file.
    181.                       Default for Linux is ~/.oci/config and %HOME/.oci/config
    182.                       on Windows.

    183. Default options are read from the following files in the given order:
    184. /etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
    185. The following groups are read: mysql client
    186. The following options may be given as the first argument:
    187. --print-defaults        Print the program argument list and exit.
    188. --no-defaults           Don't read default options from any option file,
    189.                         except for login file.
    190. --defaults-file=#       Only read default options from the given file #.
    191. --defaults-extra-file=# Read this file after the global files are read.
    192. --defaults-group-suffix=#
    193.                         Also read groups with concat(group, suffix)
    194. --login-path=#          Read this path from the login file.

    195. Variables (--variable-name=value)
    196. and boolean options {FALSE|TRUE}  Value (after reading options)
    197. --------------------------------- ----------------------------------------
    198. auto-rehash                       TRUE
    199. auto-vertical-output              FALSE
    200. bind-address                      (No default value)
    201. binary-as-hex                     FALSE
    202. character-sets-dir                (No default value)
    203. column-type-info                  FALSE
    204. comments                          FALSE
    205. compress                          FALSE
    206. database                          (No default value)
    207. default-character-set             utf8
    208. delimiter                         ;
    209. enable-cleartext-plugin           FALSE
    210. vertical                          FALSE
    211. force                             FALSE
    212. histignore                        (No default value)
    213. named-commands                    FALSE
    214. ignore-spaces                     FALSE
    215. init-command                      (No default value)
    216. local-infile                      FALSE
    217. no-beep                           FALSE
    218. host                              (No default value)
    219. dns-srv-name                      (No default value)
    220. html                              FALSE
    221. xml                               FALSE
    222. line-numbers                      TRUE
    223. unbuffered                        FALSE
    224. column-names                      TRUE
    225. sigint-ignore                     FALSE
    226. port                              0
    227. prompt                            mysql>
    228. quick                             FALSE
    229. raw                               FALSE
    230. reconnect                         TRUE
    231. socket                            (No default value)
    232. server-public-key-path            (No default value)
    233. get-server-public-key             FALSE
    234. ssl-ca                            (No default value)
    235. ssl-capath                        (No default value)
    236. ssl-cert                          (No default value)
    237. ssl-cipher                        (No default value)
    238. ssl-key                           (No default value)
    239. ssl-crl                           (No default value)
    240. ssl-crlpath                       (No default value)
    241. tls-version                       (No default value)
    242. tls-ciphersuites                  (No default value)
    243. table                             FALSE
    244. user                              (No default value)
    245. safe-updates                      FALSE
    246. i-am-a-dummy                      FALSE
    247. connect-timeout                   0
    248. max-allowed-packet                16777216
    249. net-buffer-length                 16384
    250. select-limit                      1000
    251. max-join-size                     1000000
    252. show-warnings                     FALSE
    253. plugin-dir                        (No default value)
    254. default-auth                      (No default value)
    255. binary-mode                       FALSE
    256. connect-expired-password          FALSE
    257. network-namespace                 (No default value)
    258. compression-algorithms            (No default value)
    259. zstd-compression-level            3
    260. load-data-local-dir               (No default value)
    261. fido-register-factor              (No default value)
    262. oci-config-file                   (No default value)
    复制代码



    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-4-29 13:10 , Processed in 0.051479 second(s), 22 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表