Rechercher dans le manuel MySQL
13.7.6.39 SHOW VARIABLES Syntax
SHOW VARIABLES
shows the values
of MySQL system variables (see
Section 5.1.8, “Server System Variables”). This statement does
not require any privilege. It requires only the ability to
connect to the server.
System variable information is also available from these sources:
Performance Schema tables. See Section 26.12.13, “Performance Schema System Variable Tables”.
The mysqladmin variables command. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”.
For SHOW VARIABLES
, a
LIKE
clause, if present, indicates
which variable names to match. A WHERE
clause
can be given to select rows using more general conditions, as
discussed in Section 25.41, “Extensions to SHOW Statements”.
SHOW VARIABLES
accepts an
optional GLOBAL
or SESSION
variable scope modifier:
With a
GLOBAL
modifier, the statement displays global system variable values. These are the values used to initialize the corresponding session variables for new connections to MySQL. If a variable has no global value, no value is displayed.With a
SESSION
modifier, the statement displays the system variable values that are in effect for the current connection. If a variable has no session value, the global value is displayed.LOCAL
is a synonym forSESSION
.If no modifier is present, the default is
SESSION
.
The scope for each system variable is listed at Section 5.1.8, “Server System Variables”.
SHOW VARIABLES
is subject to a
version-dependent display-width limit. For variables with very
long values that are not completely displayed, use
SELECT
as a workaround. For
example:
Most system variables can be set at server startup (read-only
variables such as
version_comment
are
exceptions). Many can be changed at runtime with the
SET
statement. See Section 5.1.9, “Using System Variables”, and
Section 13.7.5.1, “SET Syntax for Variable Assignment”.
Partial output is shown here. The list of names and values may differ for your server. Section 5.1.8, “Server System Variables”, describes the meaning of each variable, and Section 5.1.1, “Configuring the Server”, provides information about tuning them.
- +--------------------------------------------+------------------------------+
- +--------------------------------------------+------------------------------+
- | activate_all_roles_on_login | OFF |
- | auto_increment_increment | 1 |
- | auto_increment_offset | 1 |
- | avoid_temporal_upgrade | OFF |
- | back_log | 151 |
- | basedir | /usr/ |
- | big_tables | OFF |
- | bind_address | * |
- | binlog_cache_size | 32768 |
- | binlog_direct_non_transactional_updates | OFF |
- | binlog_error_action | ABORT_SERVER |
- | binlog_expire_logs_seconds | 2592000 |
- | binlog_format | ROW |
- | binlog_group_commit_sync_delay | 0 |
- | binlog_group_commit_sync_no_delay_count | 0 |
- | binlog_max_flush_queue_time | 0 |
- | binlog_row_metadata | MINIMAL |
- | binlog_row_value_options | |
- | binlog_rows_query_log_events | OFF |
- | binlog_stmt_cache_size | 32768 |
- | binlog_transaction_dependency_history_size | 25000 |
- | binlog_transaction_dependency_tracking | COMMIT_ORDER |
- | block_encryption_mode | aes-128-ecb |
- | bulk_insert_buffer_size | 8388608 |
- ...
- | max_allowed_packet | 67108864 |
- | max_binlog_cache_size | 18446744073709547520 |
- | max_binlog_size | 1073741824 |
- | max_binlog_stmt_cache_size | 18446744073709547520 |
- | max_connect_errors | 100 |
- | max_connections | 151 |
- | max_delayed_threads | 20 |
- | max_digest_length | 1024 |
- | max_error_count | 1024 |
- | max_execution_time | 0 |
- | max_heap_table_size | 16777216 |
- | max_insert_delayed_threads | 20 |
- | max_join_size | 18446744073709551615 |
- ...
- | thread_stack | 286720 |
- | time_zone | SYSTEM |
- | tls_version | TLSv1,TLSv1.1,TLSv1.2 |
- | tmp_table_size | 16777216 |
- | tmpdir | /tmp |
- | transaction_alloc_block_size | 8192 |
- | transaction_allow_batching | OFF |
- | transaction_prealloc_size | 4096 |
- | transaction_read_only | OFF |
- | transaction_write_set_extraction | XXHASH64 |
- | updatable_views_with_limit | YES |
- | version_comment | MySQL Community Server - GPL |
- | version_compile_machine | x86_64 |
- | version_compile_os | Linux |
- | version_compile_zlib | 1.2.11 |
- | wait_timeout | 28800 |
- | warning_count | 0 |
- +--------------------------------------------+------------------------------+
With a LIKE
clause, the statement
displays only rows for those variables with names that match the
pattern. To obtain the row for a specific variable, use a
LIKE
clause as shown:
To get a list of variables whose name match a pattern, use the
%
wildcard character in a
LIKE
clause:
Wildcard characters can be used in any position within the
pattern to be matched. Strictly speaking, because
_
is a wildcard that matches any single
character, you should escape it as \_
to
match it literally. In practice, this is rarely necessary.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-show-variables.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.