OptionsOn mysql itself
--auto-rehash
Enable automatic rehashing
--auto-vertical-output
Enable automatic vertical result set display
--batch-B
Do not use history file
--binary-as-hex
Display binary values in hexadecimal notation
--binary-mode
Disable \r\n - to - \n translation and treatment of \0 as end-of-query
--bind-address
Use specified network interface to connect to MySQL Server <ip_address>
--character-sets-dir
Directory where character sets are installed <dir_name>
--column-names
Write column names in results
--column-type-info
Display result set metadata
--comments-c
Whether to retain or strip comments in statements sent to the server
--compress-C
Compress all information sent between client and server
--compression-algorithms
Permitted compression algorithms for connections to server <value>
--connect-expired-password
Indicate to server that client can handle expired-password sandbox mode
--connect-timeout
Number of seconds before connection timeout <value>
-D--database
The database to use <db_name>
--debug
Write debugging log; supported only if MySQL was built with debugging support
--debug-check
Print debugging information when program exits
-T--debug-info
Print debugging information, memory, and CPU statistics when program exits
--default-auth
Authentication plugin to use <plugin>
--default-character-set
Specify default character set <charset_name>
--defaults-extra-file
Read named option file in addition to usual option files <file_name>
--defaults-file
Read only named option file <file_name>
--defaults-group-suffix
Option group suffix value <str>
--delimiter
Set the statement delimiter <str>
--disable-named-commands
Disable named commands. Use the \* form only, or use named commands only at the beginning of a line ending with a semicolon (;). mysql starts with this option enabled by default. However, even with this option, long-format commands still work from the first line
--dns-srv-name
Use DNS SRV lookup for host information <name>
--enable-cleartext-plugin
Enable cleartext authentication plugin
-e--execute
Execute the statement and quit <statement>
-f--force
Continue even if an SQL error occurs
--get-server-public-key
Request RSA public key from server
--help-?
Display help message and exit
--histignore
Patterns specifying which statements to ignore for logging
-h--host
Host on which MySQL server is located <host_name>
-H--html
Produce HTML output
-i--ignore-spaces
Ignore spaces after function names
--init-command
SQL statement to execute after connecting <command>
--line-numbers
Write line numbers for errors
--load-data-local-dir
Directory for files named in LOAD DATA LOCAL statements <dir_name>
--local-infile
Enable or disable for LOCAL capability for LOAD DATA <is-local-inflie>
--login-path
Read login path options from .mylogin.cnf <name>
--max-allowed-packet
Maximum packet length to send to or receive from server <value>
--max-join-size
The automatic limit for rows in a join when using --safe-updates <value>
-G--named-commands
Enable named mysql commands
--net-buffer-length
Buffer size for TCP/IP and socket communication <value>
--network-namespace
Specify network namespace <name>
-A--no-auto-rehash
Disable automatic rehashing
--no-beep-b
Do not beep when errors occur
--no-defaults
Read no option files
-o--one-database
Ignore statements except those for the default database named on the command line
--pager
Use the given command for paging query output <command>
-p--password
Password to use when connecting to server <password>
--pipe-W
Connect to server using named pipe (Windows only)
--plugin-dir
Directory where plugins are installed <dir_name>
-P--port
TCP/IP port number for connection <port_num>
--print-defaults
Print default options
--prompt
Set the prompt to the specified format <format_str>
--protocol
Transport protocol to use <format_str>
-q--quick
Do not cache each query result
-r--raw
Write column values without escape conversion
--reconnect
If the connection to the server is lost, automatically try to reconnect
-U--safe-updates--i-am-a-dummy
Allow only UPDATE and DELETE statements that specify key values
--select-limit
The automatic limit for SELECT statements when using --safe-updates <value>
--server-public-key-path
Path name to file containing RSA public key <filename>
--shared-memory-base-name
Shared-memory name for shared-memory connections (Windows only) <name>
--show-warnings
Show warnings after each statement if there are any
--sigint-ignore
Ignore SIGINT signals (typically the result of typing Control+C)
-s--silent
Silent mode. Produce less output. This option can be given multiple times to produce less and less output
--skip-auto-rehash
Disable automatic rehashing
-N--skip-column-names
Do not write column names in results
-L--skip-line-numbers
Skip line numbers for errors
--skip-named-commands
Disable named mysql commands
--skip-pager
Disable paging
--skip-reconnect
Disable reconnecting
-S--socket
Unix socket file or Windows named pipe to use"File that contains list of trusted SSL Certificate Authorities" <name>
--ssl-ca
File that contains list of trusted SSL Certificate Authorities <filename>
--ssl-capath
Directory that contains trusted SSL Certificate Authority certificate files <dirname>
--ssl-cert
File that contains X.509 certificate <filename>
--ssl-cipher
Permissible ciphers for connection encryption
--ssl-crl
File that contains certificate revocation lists <filename>
--ssl-crlpath
Directory that contains certificate revocation-list files <dirname>
--ssl-fips-mode
Whether to enable FIPS mode on client side <mode>
--ssl-key
File that contains X.509 key <filename>
--ssl-mode
Desired security state of connection to server
-j--syslog
Log interactive statements to syslog
-t--table
Display output in tabular format
--tee
Append a copy of output to named file <file_name>
--tls-ciphersuites
Permissible TLSv1.3 ciphersuites for encrypted connections <ciphersuite_list>
--tls-version
Permissible TLS protocols for encrypted connections <protocol_list>
-n--unbuffered
Flush the buffer after each query
-u--user
MySQL user name to use when connecting to server <user_name>
-V--version
Display version information and exit
-E--vertical
Print query output rows vertically (one line per column value)
-w--wait
If the connection cannot be established, wait and retry instead of aborting
-X--xml
Produce XML output
--zstd-compression-level
Compression level for connections to server that use zstd compression <level>