Purpose
You can use this statement to set variables.
Syntax
SET [SESSION GLOBAL] var_and_val_list;
var_and_val_list:
var_and_val [,var_and_val ...]
var_and_val:
var {TO =} set_expr_or_default
Parameters
| Parameter | Description |
|---|---|
| SESSION GLOBAL | Specifies whether to set a session or global variable. A session variable is set by default. |
| var | The name of the variable. |
Examples
Set a user variable
a.obclient> SET @a = 1;Set a global system variable
secure_file_priv, which specifies the path accessible when you import/export data to/from a file.obclient> SET GLOBAL secure_file_priv = '';Set a user variable
proxy_route_policy, which specifies the routing policy.obclient> SET @proxy_route_policy = 'follower_first';