Syntax:
SET variable_assignment [, variable_assignment] ...

variable_assignment:
      user_var_name = expr
    | param_name = expr
    | local_var_name = expr
    | [GLOBAL | SESSION]
        system_var_name = expr
    | [@@global. | @@session. | @@]
        system_var_name = expr

SET syntax for variable assignment enables you to assign values to
different types of variables that affect the operation of the server or
clients:

o System variables. See
  http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html.
  System variables also can be set at server startup, as described in
  http://dev.mysql.com/doc/refman/5.7/en/using-system-variables.html.
  (To display system variable names and values, use the SHOW VARIABLES
  statement; see [HELP SHOW VARIABLES].)

o User-defined variables. See
  http://dev.mysql.com/doc/refman/5.7/en/user-variables.html.

o Stored procedure and function parameters, and stored program local
  variables. See
  http://dev.mysql.com/doc/refman/5.7/en/stored-program-variables.html.

URL: http://dev.mysql.com/doc/refman/5.7/en/set-variable.html

