Spec-Zone .ru
спецификации, руководства, описания, API

4.5.1.1. mysql Options

mysql supports the following options, which can be specified on the command line or in the [mysql] and [client] groups of an option file. mysql also supports the options for processing option files described at Section 4.2.3.4, "Command-Line Options that Affect Option-File Handling".

Table 4.4. mysql Options

Format Option File Description Introduced
--auto-rehash auto-rehash Enable automatic rehashing
--auto-vertical-output auto-vertical-output Enable automatic vertical result set display
--batch batch Don't use history file
--binary-mode binary-mode Disable \r\n - to - \n translation and treatment of \0 as end-of-query
--bind-address=ip_address bind-address Use the specified network interface to connect to the MySQL Server
--character-sets-dir=path character-sets-dir Set the default character set
--column-names column-names Write column names in results
--column-type-info column-type-info Display result set metadata
--comments comments Whether to retain or strip comments in statements sent to the server
--compress compress Compress all information sent between the client and the server
--connect-expired-password Indicate to server that client can handle expired-password sandbox mode. 5.6.12
--connect_timeout=value connect_timeout The number of seconds before connection timeout
--database=dbname database The database to use
--debug[=debug_options] debug Write a debugging log
--debug-check debug-check Print debugging information when the program exits
--debug-info debug-info Print debugging information, memory and CPU statistics when the program exits
--default-auth=plugin default-auth=plugin The authentication plugin to use
--default-character-set=charset_name default-character-set Use charset_name as the default character set
--delimiter=str delimiter Set the statement delimiter
--enable-cleartext-plugin enable-cleartext-plugin Enable cleartext authentication plugin 5.6.7
--execute=statement execute Execute the statement and quit
--force force Continue even if an SQL error occurs
--help Display help message and exit
--histignore=pattern_list histignore Patterns specifying which statements to ignore for logging 5.6.8
--host=host_name host Connect to the MySQL server on the given host
--html html Produce HTML output
--ignore-spaces ignore-spaces Ignore spaces after function names
--init-command=str init-command SQL statement to execute after connecting
--line-numbers line-numbers Write line numbers for errors
--local-infile[={0|1}] local-infile Enable or disable for LOCAL capability for LOAD DATA INFILE
--login-path=name Read login path options from .mylogin.cnf 5.6.6
--max_allowed_packet=value max_allowed_packet The maximum packet length to send to or receive from the server
--max_join_size=value max_join_size The automatic limit for rows in a join when using --safe-updates
--named-commands named-commands Enable named mysql commands
--net_buffer_length=value net_buffer_length The buffer size for TCP/IP and socket communication
--no-auto-rehash Disable automatic rehashing
--no-beep no-beep Do not beep when errors occur
--one-database one-database Ignore statements except those for the default database named on the command line
--pager[=command] pager Use the given command for paging query output
--password[=password] password The password to use when connecting to the server
--plugin-dir=path plugin-dir=path The directory where plugins are located
--port=port_num port The TCP/IP port number to use for the connection
--prompt=format_str prompt Set the prompt to the specified format
--protocol=type protocol The connection protocol to use
--quick quick Do not cache each query result
--raw raw Write column values without escape conversion
--reconnect reconnect If the connection to the server is lost, automatically try to reconnect
--safe-updates safe-updates Allow only UPDATE and DELETE statements that specify key values
--secure-auth secure-auth Do not send passwords to the server in old (pre-4.1.1) format
--select_limit=value select_limit The automatic limit for SELECT statements when using --safe-updates
--server-public-key-path=file_name server-public-key-path=file_name Display help message and exit 5.6.6
--show-warnings show-warnings Show warnings after each statement if there are any
--sigint-ignore sigint-ignore Ignore SIGINT signals (typically the result of typing Control+C)
--silent silent Silent mode
--skip-auto-rehash skip-auto-rehash Disable automatic rehashing
--skip-column-names skip-column-names Do not write column names in results
--skip-line-numbers skip-line-numbers Skip line numbers for errors
--skip-named-commands skip-named-commands Disable named mysql commands
--skip-pager skip-pager Disable paging
--skip-reconnect skip-reconnect Disable reconnecting
--socket=path socket For connections to localhost
--ssl-ca=file_name ssl-ca The path to a file that contains a list of trusted SSL CAs
--ssl-capath=dir_name ssl-capath The path to a directory that contains trusted SSL CA certificates in PEM format
--ssl-cert=file_name ssl-cert The name of the SSL certificate file to use for establishing a secure connection
--ssl-cipher=cipher_list ssl-cipher A list of allowable ciphers to use for SSL encryption
--ssl-crl=file_name ssl-crl The path to a file that contains certificate revocation lists 5.6.3
--ssl-crlpath=dir_name ssl-crlpath The path to a directory that contains certificate revocation list files 5.6.3
--ssl-key=file_name ssl-key The name of the SSL key file to use for establishing a secure connection
--ssl-verify-server-cert ssl-verify-server-cert The server's Common Name value in its certificate is verified against the host name used when connecting to the server
--table table Display output in tabular format
--tee=file_name tee Append a copy of output to the given file
--unbuffered unbuffered Flush the buffer after each query
--user=user_name user MySQL user name to use when connecting to server
--verbose Verbose mode
--version Display version information and exit
--vertical vertical Print query output rows vertically (one line per column value)
--wait wait If the connection cannot be established, wait and retry instead of aborting
--xml xml Produce XML output

You can also set the following variables by using --var_name=value.