Variables

Description

The SHOW VARIABLES command provides a name value pair of various Internal variables. There is a GLOBAL and SESSION scope. Refer to Server Option and Variable Reference in the MySQL Reference Manual for more details on the scope of variables.

Syntax

MySQL/MariaDB

mysql> SHOW GLOBAL VARIABLES;
$ mysqladmin variables

Drizzle

drizzle> SHOW GLOBAL VARIABLES;

Example

mysql> SHOW GLOBAL VARIABLES;
+---------------------------------+-------------------------------------------+
| Variable_name                   | Value                                     |
+---------------------------------+-------------------------------------------+
| auto_increment_increment        | 1                                         |
| auto_increment_offset           | 1                                         |
| autocommit                      | ON                                        |
| basedir                         | /opt/mysql-5.1.25-rc-linux-x86_64-glibc23/|
| binlog_cache_size               | 32768                                     |
| binlog_format                   | MIXED                                     |
| character_set_client            | latin1                                    |
| character_set_server            | latin1                                    |
| collation_server                | latin1_swedish_ci                         |
| datadir                         | /opt/mysql51/data/                        |
| innodb_buffer_pool_size         | 1572864000                                |
| innodb_log_file_size            | 268435456                                 |
| max_connections                 | 500                                       |
| query_cache_size                | 0                                         |
| table_open_cache                | 512                                       |
+---------------------------------+-------------------------------------------+