Home >Database >Mysql Tutorial >MySQL client options
mysql supports the options mentioned below, which can be specified on the command line or in the [mysql] and [client] groups of the options file.
- -help, -?
It helps to display a help message and exit.
--auto-rehash
It enables automatic rehash. This option is set by default, which enables database, table, and column name completion.
--auto-vertical-output
This option causes result sets to be displayed vertically if they are too wide for the current window, otherwise it uses normal tabular format.
--batch, -B
It prints results using tab characters as column separators and using each line on a new line. With this option, mysql does not use history files.
Batch mode causes non-tabular output formatting and escaping of special characters. Escapes can be disabled with the help of raw mode
--binary-as-hex
When using this option, MySQL displays binary data with the help of hexadecimal notation (0xvalue). This occurs regardless of whether the overall output display format is tabular, vertical, HTML, or XML.
--bind-address=ip_address
On computers with multiple network interfaces, this option is used to select which interface to use to connect to the MySQL server.
--character-sets-dir=dir_name
The directory where the character set is located has been installed.
--column-names
is used to write column names in the results.
--column-type-info
is used to display result set metadata. This information corresponds to the contents of the C API MYSQL_FIELD data structure.--comments, -c
It tells whether to remove or retain comments in statements sent to the server. Defaults to --skip-comments (to strip comments), enable --comments (to preserve comments).
--compress, -C
is used to compress all information sent between the client and server if possible. Starting with MySQL 8.0.18, this option has been deprecated.
The above is the detailed content of MySQL client options. For more information, please follow other related articles on the PHP Chinese website!