1. MySQL command line parameters
Usage: MySQL [Options] [database] // command Method
-?, -- Help // display help information and exit
-I, -- help // display help information and exit
-- Auto-rehash // The auto-complement function is similar to the prompt by pressing the tab key in Linux. The following is an example.
-A, -- no-auto-rehash // The default status does not have the auto-completion function. -A does not automatically complete the function.
-B, -- batch // ysql does not use history files, disable Interaction
(Enables -- silent)
-- Character-sets-Dir = Name // installation directory of the font set
-- Default-character-set = Name // sets the default Character Set of the database.
-C, -- compress // use compression when the client and server transmit information
-#, -- Debug [= #] // bug call Function
-D, -- database = Name // which database to use
-- Delimiter = Name // The default MySQL Command Terminator is a semicolon. The following is an example:
-E, -- execute = Name // execute the MySQL SQL statement
-E, -- vertical // print the query output vertically
-F, -- force // if an error exists, continue to execute the following
-G, -- named-Commands
/* Enable named commands. Named commands mean this program's
Internal commands; see mysql> help. When enabled,
Named commands can be used from any line of the query,
Otherwise only from the first line, before an enter.
Disable with -- disable-named-commands. This option is
Disabled by default .*/
-G, -- no-named-Commands
/* Named commands are disabled. Use \ * form only, or use
Named commands only in the beginning of a line ending
With a semicolon (;) Since version 10.9 The client now
Starts with this option enabled by default! Disable
'-G'. Long Format Commands still work from the first
Line. Warning: Option deprecated; Use
-- Disable-named-commands instead .*/
-I, -- ignore-spaces // ignore the space behind the function name.
-- Local-infile // start/disable load data local infile.
-B, -- no-Beep // when an SQL error occurs, you are not allowed to beep.
-H, -- Host = Name // set the name or IP address of the Connected Server
-H, -- HTML // output in HTML Format
-X, -- XML // output in XML format
-- Line-numbers // display the wrong row number
-L, -- skip-line-numbers // ignore the wrong row number
-N, -- unbuffered // refresh the cache after each SQL statement is executed
-- Column-names // column information is displayed during query. The column information is added by default.
-N, -- skip-column-names // The column information is not displayed.
-O, -- Set-variable = Name // set the variable usage to -- Set-variable = var_name = var_value
-- SIGINT-ignore // ignore SIGINT (result of control-c Upon logon Exit)
-O, -- one-database // ignore statements except for the default database named in the command line. It can help skip updates of other databases in the log.
-- Pager [= Name] // use the page splitter to display the query output. in Linux, you can use more or less.
-- No-pager // No page splitter is used to display query output.
-P, -- password [= Name] // enter the password
-P, -- Port = # // set the port
-- Prompt = Name // set the MySQL prompt
-- Protocol = Name // protocol used
-Q, -- quick // do not cache the query results and print each row in sequence. If the output is suspended, the server slows down and MySQL does not use historical files.
-R, -- raw // write column values without escape conversion. It is usually used in combination with the -- batch option.
-- Reconnect // If the connection is disconnected from the server, the system automatically tries to reconnect. Disable reconnection and use -- disable-reconnect.
-S, -- silent // one line of output, separated by tabs
-S, -- socket = Name // connect to the server's sockey File
-- SSL // activate the SSL connection and disable -- skip-SSL
-- SSL-CA = Name // CA certificate
-- SSL-capath = Name // ca path
-- SSL-Cert = Name // X509 Certificate
-- SSL-Cipher = Name // SSL cipher to use (implies -- SSL ).
-- SSL-Key = Name // X509 key name
-- SSL-verify-server-Cert // audit the server certificate when connecting
-T, -- table // output as a table
-- Tee = Name // Add the output copy to the specified file. -- disable-tee is used when the file is disabled.
-- No-tee // The root -- disable-tee function is the same
-U, -- user = Name // User Name
-U, -- safe-Updates // only allow update and delete that uses keys.
-U, -- I-Am-a-dummy // synonym for option -- safe-updates,-U.
-V, -- verbose // output the statement executed by MySQL
-V, -- version // version information
-W, -- Wait // wait for the restart time after the server is down
-- Connect_timeout = # // time to wait before connection
-- Max_allowed_packet = # // Maximum length of the server receiving/sending package
-- Net_buffer_length = # // size of the TCP/IP and socket communication buffer.
-- Select_limit = # // automatic restriction of the SELECT statement when -- safe-updates is used
-- Max_join_size = # // use -- safe-updates to automatically restrict the rows in the connection
-- Secure-auth // refuse to connect to the database in the (pre-4.1.1) Way
-- Server-Arg = Name // send Embedded Server this as a parameter.
-- Show-warnings // display warning