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

SHOW VARIABLES shows the values of MySQL system variables. This
information also can be obtained using the mysqladmin variables
command. The LIKE clause, if present, indicates which variable names to
match. The WHERE clause can be given to select rows using more general
conditions, as discussed in
http://dev.mysql.com/doc/refman/5.0/en/extended-show.html. This
statement does not require any privilege. It requires only the ability
to connect to the server.

With the GLOBAL modifier, SHOW VARIABLES displays the values that are
used for new connections to MySQL. If a variable has no global value,
the session value is displayed. With SESSION, SHOW VARIABLES 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

