Syntax:
SHOW [GLOBAL | SESSION] VARIABLES [LIKE 'pattern']

SHOW VARIABLES shows the values of MySQL system variables. This
information also can be obtained using the mysqladmin variables
command.

With the GLOBAL modifier, SHOW VARIABLES displays the values that are
used for new connections to MySQL. With SESSION, it displays the values
that are in effect for the current connection. If no modifier is
present, the default is SESSION. LOCAL is a synonym for SESSION.
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:

SHOW VARIABLES LIKE 'max_join_size';
SHOW SESSION VARIABLES LIKE 'max_join_size';

To get a list of variables whose name match a pattern, use the `%'
wildcard character in a LIKE clause:

SHOW VARIABLES LIKE '%size%';
SHOW GLOBAL VARIABLES LIKE '%size%';

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.

URL: http://dev.mysql.com/doc/refman/5.0/en/show-variables.html

