mysql <arg>

Mysql is a terminal-based front-end to MySQL

Arguments

NameDescription
arg

Options

NameDescription
--auto-rehashEnable automatic rehashing
--auto-vertical-outputEnable automatic vertical result set display
--batch, -BDo not use history file
--binary-as-hexDisplay binary values in hexadecimal notation
--binary-modeDisable \r\n - to - \n translation and treatment of \0 as end-of-query
--bind-address <ip_address>Use specified network interface to connect to MySQL Server
--character-sets-dir <dir_name>Directory where character sets are installed
--column-namesWrite column names in results
--column-type-infoDisplay result set metadata
--comments, -cWhether to retain or strip comments in statements sent to the server
--compress, -CCompress all information sent between client and server
--compression-algorithms <value>Permitted compression algorithms for connections to server
--connect-expired-passwordIndicate to server that client can handle expired-password sandbox mode
--connect-timeout <value>Number of seconds before connection timeout
-D, --database <db_name>The database to use
--debugWrite debugging log; supported only if MySQL was built with debugging support
--debug-checkPrint debugging information when program exits
-T, --debug-infoPrint debugging information, memory, and CPU statistics when program exits
--default-auth <plugin>Authentication plugin to use
--default-character-set <charset_name>Specify default character set
--defaults-extra-file <file_name>Read named option file in addition to usual option files
--defaults-file <file_name>Read only named option file
--defaults-group-suffix <str>Option group suffix value
--delimiter <str>Set the statement delimiter
--disable-named-commandsDisable 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 <name>Use DNS SRV lookup for host information
--enable-cleartext-pluginEnable cleartext authentication plugin
-e, --execute <statement>Execute the statement and quit
-f, --forceContinue even if an SQL error occurs
--get-server-public-keyRequest RSA public key from server
--help, -?Display help message and exit
--histignorePatterns specifying which statements to ignore for logging
-h, --host <host_name>Host on which MySQL server is located
-H, --htmlProduce HTML output
-i, --ignore-spacesIgnore spaces after function names
--init-command <command>SQL statement to execute after connecting
--line-numbersWrite line numbers for errors
--load-data-local-dir <dir_name>Directory for files named in LOAD DATA LOCAL statements
--local-infile <is-local-inflie>Enable or disable for LOCAL capability for LOAD DATA
--login-path <name>Read login path options from .mylogin.cnf
--max-allowed-packet <value>Maximum packet length to send to or receive from server
--max-join-size <value>The automatic limit for rows in a join when using --safe-updates
-G, --named-commandsEnable named mysql commands
--net-buffer-length <value>Buffer size for TCP/IP and socket communication
--network-namespace <name>Specify network namespace
-A, --no-auto-rehashDisable automatic rehashing
--no-beep, -bDo not beep when errors occur
--no-defaultsRead no option files
-o, --one-databaseIgnore statements except those for the default database named on the command line
--pager <command>Use the given command for paging query output
-p, --password <password>Password to use when connecting to server
--pipe, -WConnect to server using named pipe (Windows only)
--plugin-dir <dir_name>Directory where plugins are installed
-P, --port <port_num>TCP/IP port number for connection
--print-defaultsPrint default options
--prompt <format_str>Set the prompt to the specified format
--protocol <format_str>Transport protocol to use
-q, --quickDo not cache each query result
-r, --rawWrite column values without escape conversion
--reconnectIf the connection to the server is lost, automatically try to reconnect
-U, --safe-updates, --i-am-a-dummyAllow only UPDATE and DELETE statements that specify key values
--select-limit <value>The automatic limit for SELECT statements when using --safe-updates
--server-public-key-path <filename>Path name to file containing RSA public key
--shared-memory-base-name <name>Shared-memory name for shared-memory connections (Windows only)
--show-warningsShow warnings after each statement if there are any
--sigint-ignoreIgnore SIGINT signals (typically the result of typing Control+C)
-s, --silent
  • Repeatable ♾
--skip-auto-rehashDisable automatic rehashing
-N, --skip-column-namesDo not write column names in results
-L, --skip-line-numbersSkip line numbers for errors
--skip-named-commandsDisable named mysql commands
--skip-pagerDisable paging
--skip-reconnectDisable reconnecting
-S, --socket <name>Unix socket file or Windows named pipe to use"File that contains list of trusted SSL Certificate Authorities"
--ssl-ca <filename>File that contains list of trusted SSL Certificate Authorities
--ssl-capath <dirname>Directory that contains trusted SSL Certificate Authority certificate files
--ssl-cert <filename>File that contains X.509 certificate
--ssl-cipherPermissible ciphers for connection encryption
--ssl-crl <filename>File that contains certificate revocation lists
--ssl-crlpath <dirname>Directory that contains certificate revocation-list files
--ssl-fips-mode <mode>Whether to enable FIPS mode on client side
--ssl-key <filename>File that contains X.509 key
--ssl-modeDesired security state of connection to server
-j, --syslogLog interactive statements to syslog
-t, --tableDisplay output in tabular format
--tee <file_name>Append a copy of output to named file
--tls-ciphersuites <ciphersuite_list>Permissible TLSv1.3 ciphersuites for encrypted connections
--tls-version <protocol_list>Permissible TLS protocols for encrypted connections
-n, --unbufferedFlush the buffer after each query
-u, --user <user_name>MySQL user name to use when connecting to server
-v, --verboseVerbose mode
-V, --versionDisplay version information and exit
-E, --verticalPrint query output rows vertically (one line per column value)
-w, --waitIf the connection cannot be established, wait and retry instead of aborting
-X, --xmlProduce XML output
--zstd-compression-level <level>Compression level for connections to server that use zstd compression